api-promise
v1.0.1
Published
An observable to run async tasks in parallel with a concurrency limit
Downloads
14
Readme
api-promise
Helper for fast API consuming in promises.
Installing
npm install api-promise --save
Usage
const ap = require('api-promise')
const github = ap('api.github.com', 'GITHUB-TOKEN')
github('POST', '/some/api/path', { param: 'value' })
.then(res => {
// do something with the response
})
.catch(err => {
// do something with the error
})