svb-client
NodeJS library which helps you make GET and POST requests to the SVB API.
If you received a test API key and no HMAC SECRET, you should use a
non-empty ASCII string as a placeholder (for example "HMAC SECRET").
Installation
npm install svb-client --save
Usage
const SVB = require('svb-client');
let client = new SVB({
API_KEY: '',
HMAC_SECRET: '',
BASE_URL: ''
});
client.get('/v1', 'test=1', (err, data) => {
...
});
client.post('/v1', { "data": "foo" }, (err, data) => {
...
});
client.patch(url, jsondata, callback);
client.delete(url, callback);
const fs = require('fs');
client.upload('/v1/files', fs.createReadStream(__dirname + '/file.png'), 'image/png', (err, data) => {
...
});