heroku-legacy

0.1.4 • Public • Published

node-heroku-api

Port of heroku-api gem to NodeJS.

Installation

$ npm install heroku-legacy

Usage

The API is exactly the same, with the following differences:

  • All the methods take a callback of the following form: function (err, body) where err is one of the error defined in src/errors.coffee if any, or null otherwise and body is the JSON response.
  • All the methods are camelCased.
  • When using the username/password constructor, the object should be used in the callback, and not as the return value.

Here is a short example (in CoffeeScript).

With username/password:

HerokuApi = require 'heroku-legacy'
new HerokuApi username: 'test@foo.jp'password: 'password'(err, api) ->
  return handleError(err) unless err == null
  api.getApps (err, apps) ->
    return handleError unless err == null
    console.log apps

With API key:

HerokuApi = require 'heroku-legacy'
api = new HerokuApi apiKey: 'my-api-key'
api.getApps (err, apps) ->
  return handleError(err) unless err == null
  console.log apps

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    4
  • 0.1.3
    3
  • 0.1.2
    2
  • 0.1.1
    2
  • 0.1.0
    2

Package Sidebar

Install

npm i heroku-legacy

Weekly Downloads

9

Version

0.1.4

License

MIT

Last publish

Collaborators

  • danhper