Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/latentflip/andbang.js
Official JS wrapper for the And Bang API.
https://github.com/latentflip/andbang.js
Last synced: 30 days ago
JSON representation
Official JS wrapper for the And Bang API.
- Host: GitHub
- URL: https://github.com/latentflip/andbang.js
- Owner: latentflip
- Created: 2013-07-23T20:01:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-23T20:27:38.000Z (over 11 years ago)
- Last Synced: 2024-04-15T02:17:34.366Z (7 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
#And Bang API Client
### Makes it dead simple to build web apps on the And Bang API.- All API functionality becomes a function call.
- Couldn't be any simplerJust include the script in your HTML
```html```
Then write some JS
```js
// init an instance of the API connection
var api = new AndBang();// then log in
api.validateToken('your access token', function (err, yourUser) {
window.me = yourUser;
});// 'ready' is triggered when you're successfully logged in
api.on('ready', function () {
// 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.
api.getTeams(function (err, myTeams) {
window.teams = myTeams;
});
});
```It uses socket.io under the covers so you get realtime, seemless API access that's as easy as AJAX.
Have fun!
### Docs
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.node ./build