# heroku-legacy

> Heroku legacy API client for NodeJS

Latest version **0.1.4** (published 2014-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install heroku-legacy
pnpm add heroku-legacy
yarn add heroku-legacy
bun add heroku-legacy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2014-08-26 |
| First published | 2014-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Perez |
| Maintainers | tuvistavie |
| Keywords | git |

## Links

- npm: https://www.npmjs.com/package/heroku-legacy
- Repository: https://github.com/claudetech/node-heroku-legacy
- Issues: https://github.com/claudetech/node-heroku-legacy/issues
- npm.io page: https://npm.io/package/heroku-legacy

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [request](https://npm.io/package/request.md) ^2.40.0

## Recent versions

- 0.1.4 (latest) — 2014-08-26
- 0.1.3 — 2014-08-26
- 0.1.2 — 2014-08-25
- 0.1.1 — 2014-08-23
- 0.1.0 — 2014-08-23

## README

# node-heroku-api

Port of [heroku-api gem](https://github.com/heroku/heroku.rb) to NodeJS.

## Installation

```sh
$ 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:

```coffee
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:

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

---
_Source: https://npm.io/package/heroku-legacy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
