Client for andbang api
#And Bang API Client
Just include the script in your HTML
Then write some JS
// init an instance of the API connectionvar api = ;// then log inapivalidateToken'your access token'windowme = yourUser;;// 'ready' is triggered when you're successfully logged inapion'ready'// once 'ready' has been triggered// all your normal API functions are available// as function calls.// for example, we can just fetch our teams// and pass it a callback.apigetMyTeamswindowteams = myTeams;;;
It uses socket.io under the covers so you get realtime, seemless API access that's as easy as AJAX.
You can see all available API methods on the developer docs: https://developer.andbang.com
###andbang.template.js andbang.js is generated from the provided API specification, spec.json. This allows automation allows for rapid expansion of the API across many platforms.
To generate andbang.js, run the provided build script, which depends on spec.json and andbang.template.js.