gitbook-api
Node and browser, javascript client for the GitBook.com API.
Installation
$ npm install gitbook-api --save
Usages
const GitBookAPI = require('gitbook-api');
const client = new GitBookAPI();
Or create an API client with an authentified user:
const client = new GitBookAPI({
username: 'MyUsername',
token: 'password or token'
});
Or using an OAuth token:
var client = new GitBookAPI({
token: 'oauth token'
});
Then execute API requests:
client.get('book/you/yourbook')
.then((json) => {})
.catch(err => {})
client.post('book/you/yourbook/discussions/1/comments', { ... })