Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

api-promise

vigour-io15ISC1.0.1

An observable to run async tasks in parallel with a concurrency limit

consume, api, pomise

readme

api-promise

Build Status js-standard-style npm version Coverage Status

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
  })