api-promise

1.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i api-promise

    Weekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • vigour-io