0.1.1 • Published 5 years ago

gab-api-wrapper v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Gab API Wrapper

This wrapper allows easy access to the Gab.com API. It uses Axios to make GET, POST, and DELETE requests to their API and returns their results. All avaialble endpoints are avaialable within this wrapper. You will need to use OAuth2 to retrieve your users' auth token, which is then passed into the wrapper. More information is available on their documentation.

Links

Prerequisites

  • Register a Gab.com account at Gab.com
  • Purchase Pro from Gab's store. Pro is currently require to access Gab's API.
  • Visit User -> Settings and create a developer application.
  • Authenticate your user with their OAuth2 endpoint and get their auth token.

Usage

const Gab = require('gab-api-wrapper');

const gab = new Gab({
  auth: '<Auth Token>'
});

// .then
gab.me()
  .then(response => {
    console.log(response);
  });

// async/await
const getMe = async () => {
  const me = await gab.me();

  console.log(me);
}

getMe();
0.1.1

5 years ago

0.1.0

5 years ago