Apps Home
|
Create an App
cbViewerStats
Author:
bigosmjtest
Description
Source Code
Launch App
Current Users
Created by:
Bigosmjtest
(function () { var total_tipped = 0; function init() { cb.log("This is a log"); cb.changeRoomSubject("Does this work?"); cb.sendNotice("hello world!"); cb.settings_choices = [ {name:'apiUserName', type:'str', minLength:1, maxLength:50, label: "Username"}, {name:'apiKey', type:'str', minLength:1, maxLength:50, label: "API key"} ]; cb.onEnter(CaptureUserEnter); cb.onTip(CaptureOnTip); cb.sendNotice("**Username = " + cb.settings["apiUserName"]); cb.sendNotice("**API Key = " + cb.settings["apiKey"]); } function CaptureUserEnter(user) { cb.sendNotice('All hail ' + user['user'] + '!!'); } function CaptureOnTip(tip) { total_tipped += parseInt(tip['amount']) cb.sendNotice("Total Tipped: " + total_tipped); cb.sendNotice(tip); cb.sendNotice("**Username = " + cb.settings["apiUserName"]); cb.sendNotice("**API Key = " + cb.settings["apiKey"]); } function MakeRestCall(url, method, parameters) { } init(); MakeRestCall("https://jsonplaceholder.typicode.com/posts", "get", null); })();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.