A wrapper for the gab.ai API
Service | Status |
---|---|
CircleCI |
If you find this project useful:
The API is exposed as a single Gab
object, which must be initialized with an authorized JWT.
var Gab = require('gab.ai').Gab;
var api = new Gab({
authToken: '<your JWT>'
})
Once you have an instance of the Gab object, calling each API method will return a Promise object. For example, to get information for a user:
api.getUser('a')
.then(function(data) {
console.log(data);
}).catch(function() {
console.log('Request failed.');
});
For information on Promise objects, see the documentation for request-promise.
npm test