API Examples

Read only API (Scroll down for Editable API)                
API uses Get for channel statistics                
Requests per endpoint must be polled greater than 15 seconds, anything more frequent will be denied. Long term abuse will result in revocation of API access.                
                 
Example URLs                
https://branebot.com/data/AllTimeFollowerCount/mytoken?type=text              
https://branebot.com/data/AllTimeFollowerCount/mytoken?type=json  
                 
JSON return type has one variable called, Result                
The token needed can be acquired from https://branebot.com/Account/Settings under Integration tab.                
                 
The sample html below can be used in OBS. Save the file to your local machine and point a browser source to it.                
It will automatically update every 15 seconds.                
https://goo.gl/GeZt7x           
                 
Available EndpointsTypeJSON ResponseText Response
ViewerCountinteger{ "Result": 0 }0
ChatterCountinteger{ "Result": 0 }0
ChatFollowerCountinteger{ "Result": 0 }0
ChatSubscriberCountinteger{ "Result": 0 }0
ChatModeratorCountinteger{ "Result": 0 }0
LatestDonatorstring{ "Result": "SomeDonator" }SomeDonater
LatestDonationAmountinteger{ "Result": 0 }0
LatestFollowerstring{ "Result": "SomeFollower" }SomeFollower
LatestSubscriberstring{ "Result": "SomeSubber" }SomeSubber
LatestReSubscriberstring{ "Result": "SomeReSubber" }SomeReSubber
SessionFollowerCountinteger{ "Result": 0 }0
SessionFollowerTrain
SessionSubscriberCountinteger{ "Result": 0 }0
SessionSubscriberTrain
SessionTopDonatorstring
SessionTopDonationAmountinteger{ "Result": 0 }0
SevenDaysDonatorTrain
SevenDaysDonationTotalinteger{ "Result": 0 }0
SevenDaysFollowerCountinteger{ "Result": 0 }0
SevenDaysFollowerTrain
SevenDaysSubscriberCountinteger{ "Result": 0 }0
SevenDaysSubscriberTrain
SevenDaysTopDonatorstring
SevenDaysTopDonationAmountinteger{ "Result": 0 }0
ThirtyDaysDonatorTrainArray?
ThirtyDaysDonationTotalinteger{ "Result": 0 }0
ThirtyDaysFollowerCountinteger{ "Result": 0 }0
ThirtyDaysFollowerTrain
ThirtyDaysSubscriberCountinteger{ "Result": 0 }0
ThirtyDaysSubscriberTrain
ThirtyDaysTopDonatorstring
ThirtyDaysTopDonationAmountinteger{ "Result": 0 }0
AllTimeFollowerCountinteger{ "Result": 0 }0
AllTimeSubscriberCountinteger{ "Result": 0 }0
AllTimeTopChatterstring{ "Result": "SomeChatterBox" }ChatterBox
AllTimeTopDonatorstring{ "Result": "SomeMoneyBags" }MoneyBags
AllTimeTopDonationAmountinteger{ "Result": 0 }0
BoxArtURLstring{ "Result": "http://static-cdn.jtvnw.net/... }http://static-cdn.jtvnw.net/.. 
UpTimeinteger{ "Result": 1454545454 }1454545454
                 
Read/Write API                
Currently we support querying a user and editing their currency amount                
URL:  https://branebot.com/data/viewer/MyToken  
                 
POST takes a name/value pair list.                
command add/subtract/query              
viewer name of viewer              
amount for add or subtract command              
                 
Response                
{ "Viewer": { "Username": "superstringman", "Currency": 238590, "PrestigeLevel": 0, "PrestigeName": "standard user" }, "Success": true, "Errors": [] }                
                 
Success will be false for failed commands. Errors will have a list of all issues found with the request.                
Invalid tokens will get a 403 response.                
                 
Sample using JQuery   https://goo.gl/RIvOEx      
You need to enter your own key in the example file.                  
The token needed can be acquired from https://branebot.com/Account/Settings under Integration tab.                  

Share This Page