Skip to content

lyndsysimon/gab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A wrapper for the gab.ai API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published