bolster-api
v1.1.2
Published
Node library for the Bolster API
Downloads
12
Readme
#Bolster API
Node abstraction for the Bolster API by Jestercom. Wraps all methods using the request library, so you can do this:
var BolsterAPI = require('bolster-api');
var baseURL = 'http://some-api-url';
BolsterAPI.login('your-username', 'your-password', baseURL + '/login', function(err, account) {...});
var bolsterClient = BolsterAPI.createClient({baseURL: baseURL, apiKey: process.env.API_KEY});
bolsterClient.get({url:'/api/media'}, function(err, listOfMediaDocs) {...});
bolsterClient.get({url:'/api/boats', qs: '&limit=10&select=name,series'}, function(err, listOfProductDocs) {...});
bolsterClient.post({url: '/api/media', body: newMediaDoc}, function(err, createdDoc) {...});
...
see tests/ for more examples
Available methods
BolsterAPI.createClient
BolsterAPI.login
Client methods
apiClient.buildUrl
apiClient.get
apiClient.put
apiClient.post
apiClient.destroy