andbang
Client for andbang api
Last updated 7 years ago by hjon .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install andbang 
SYNC missed versions from official npm registry.

#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 simpler

Just include the script in your HTML

<script src="andbang.js"></script>

Then write some 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.getMyTeams(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

Current Tags

  • 0.2.0                                ...           latest (7 years ago)

17 Versions

  • 0.2.0                                ...           7 years ago
  • 0.1.16                                ...           8 years ago
  • 0.1.15                                ...           8 years ago
  • 0.1.14                                ...           8 years ago
  • 0.1.13                                ...           8 years ago
  • 0.1.12                                ...           8 years ago
  • 0.1.11                                ...           8 years ago
  • 0.1.10                                ...           8 years ago
  • 0.1.9                                ...           8 years ago
  • 0.1.8                                ...           8 years ago
  • 0.1.7                                ...           8 years ago
  • 0.1.6                                ...           8 years ago
  • 0.1.5                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |