Heroku.js
The Node.js implementation of the Heroku API. Initially a port of Heroku.rb, Heroku.jar and Heroku.py, but with some Javascript-isms and some aliases added for convention and convenience.
Installation
1 Install via npm
npm install heroku.js
Usage
Begin by instantiating with credentials. You can use an application API Key,
a user email address and API Token, or a username and password. The latter will
fetch an API Key first, so it is an asynchronous request. It will require a callback.
If you pass nothing, it will attempt to read process.env['HEROKU_API_KEY']
// Instantiate with the API Key in the environmentvar api = ; // Instantiate with API Keyvar api = "apiKey" : apiKey; // Instantiate with email and API Tokenvar api = "email" : email "apiToken" : apiToken; // Instantiate with username and password **Async reminder** "username" : username "password" : password { // Use the `api` here};
Create an application on the cedar stack
var api = apiKey;var app = api;
List applications
var api = apiKey;var apps = api;for var i=0; l=appslength; i < l; i++ console;
Add Config
var api = apiKey;api;
Get Config
var api = apiKey;var config = api;console;
Remove Config
var api = apiKey;api;
Building Locally
1 Clone the repository
git clone https://github.com/dncrews/heroku.js.git
2 Run the testing suite (eventual - This is currently non-functional).
npm test
- Todo
- Different Error Handling
- Unauthorized
- Verification Required
- Forbidden
- Not Found
- Timeout
- Locked
- Rate Limit Exceeded
- Request Failed
- Nil App
- Mock API
- This one is HUGE. It's to make my tests actually work
- Different Error Handling