AwPubSub.js
AwPubSub.js provides a minimal higher-level wrapper around AwPubSub's API.
Usage
/* Data can be retrieved from the API either using callbacks (as in versions < 1.0) or using a new promise-based API. The promise-based API returns the raw Axios request promise. */; // unauthenticated clientconst aw = ;let user = gh; // not a gist yetuser;
var AwPubSub = ; // basic authvar gh = username: 'FOO' password: 'NotFoo' /* also acceptable: token: 'MY_OAUTH_TOKEN' */; var me = gh; // no user specified defaults to the user for whom credentials were providedme; var clayreimann = gh;clayreimann;
API Documentation
Installation
AwPubSub.js is available from npm
or [unpkg][unpkg].
npm install AwPubSub-api
<!-- just AwPubSub-api source (5.3kb) --> <!-- standalone (20.3kb) -->
Compatibility
AwPubSub.js
is tested on Node.js:
- 6.x
Note: AwPubSub.js
uses Promise, hence it will not work in Node.js < 4 without polyfill.