WiPubSub.js
WiPubSub.js provides a minimal higher-level wrapper around WiPubSub'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 WiPubSub = ; // 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
WiPubSub.js is available from npm
or [unpkg][unpkg].
npm install WiPubSub-api
<!-- just WiPubSub-api source (5.3kb) --> <!-- standalone (20.3kb) -->
Compatibility
WiPubSub.js
is tested on Node.js:
- 6.x
Note: WiPubSub.js
uses Promise, hence it will not work in Node.js < 4 without polyfill.