gab icon indicating copy to clipboard operation
gab copied to clipboard

A wrapper for the gab.ai API

gab.ai

A wrapper for the gab.ai API

Service Status
CircleCI CircleCI

If you find this project useful: SayThanks.io

Usage

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.

Running Tests

npm test