npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

heroku.js

v0.12.2

Published

Node.js library for interaction with the Heroku API.

Downloads

21

Readme

Heroku.js

Work in Progress (WIP)

I'm building this library to extract off the Heroku API to a node library. Does virtually nothing... yet

  • Functional
    • Login
      • POST login - POST /login
    • Processes
      • GET ps - GET /apps/:app/ps
      • POST ps - POST /apps/:app/ps
      • POST ps restart - POST /apps/:app/ps/restart
      • POST ps scale - POST /apps/:app/ps/scale
      • POST ps stop - POST /apps/:app/ps/stop
      • PUT dynos - PUT /apps/:app/dynos
      • PUT workers - PUT /apps/:app/workers
      • PUT formation - PUT /apps/:app/formation
      • GET dyno types - GET /apps/:app/dyno-types
    • Version?
      • just say what version of this api it is
    • Releases
      • GET releases - GET /apps/:app/releases
      • GET release - GET /apps/:app/releases/:release
      • PUT release - POST /apps/:app/releases/:release
  • Todo
    • Addons
      • DELETE Addon - DELETE /apps/:app/addons/:addon
      • GET Addon - GET /addons && GET /apps/:app/addons
      • POST Addon - POST /apps/:app/addons/:addon
      • PUT Addon - PUT /apps/:app/addons/:addon
    • Apps
      • DELETE app - DELETE /apps/:app
      • GET apps - GET /apps
      • GET app - GET /apps/:app
      • GET app_maintenance - GET /apps/:app/server/maintenance
      • POST app - POST /apps
      • POST app_maintenance - POST /apps/:app/server/maintenance
      • PUT app - PUT /apps/:app
    • Attachments ???
      • GET attachments - GET /apps/:app/attachments
    • Collaborators
      • DELETE collaborator - DELETE /apps/:app/collaborators/:email
      • GET collaborators - GET /apps/:app/collaborators
      • POST collaborator - POST /apps/:app/collaborators
    • Config_vars
      • DELETE config_var - DELETE /apps/:app/config_vars/:key
      • GET config_vars - GET /apps/:app/config_vars
      • PUT config_vars - PUT /apps/:app/config_vars
    • Domains
      • DELETE domain - DELETE /apps/:app/domains/:domain
      • DELETE domains - DELETE /apps/:app/domains
      • GET domains - GET /apps/:app/domains
      • POST domain - POST /apps/:app/domains
    • Features
      • DELETE feature - DELETE /features/:feature
      • GET features - GET /features
      • GET feature - GET /features/:feature
      • POST feature - POST /features/:feature
    • Keys
      • DELETE key - DELETE /user/keys/:key
      • DELETE keys - DELETE /user/keys
      • GET keys - GET /user/keys
      • POST key - POST /user/keys
    • Logs
      • GET logs - GET /apps/:app/logs
    • Ssl_endpoints
      • DELETE ssl endpoint - DELETE /apps/:app/ssl-endpoint/:cname
      • GET ssl endpoint - GET /apps/:app/ssl-endpoint/:cname
      • GET ssl endpoints - GET /apps/:app/ssl-endpoints
      • POST ssl endpoint - POST /apps/:app/ssl-endpoints
      • POST ssl endpoint rollback - POST /apps/:app/ssl-endpoints/:cname/rollback
      • PUT ssl endpoint - PUT /apps/:app/ssl-endpoints/:cname
    • Stacks
      • GET stack - GET /apps/:app/stack
      • PUT stack - PUT /apps/:app/stack
    • User
      • GET /user
    • Different Error Handling
      • Unauthorized
      • Verification Required
      • Forbidden
      • Not Found
      • Timeout
      • Locked
      • Rate Limit Exceeded
      • Request Failed
      • Nil App

Eventual README.md

Installation

1 Install via npm

npm install https://github.com/dncrews/heroku.js.git

Examples

Instantiate HerokuAPI with an API key

var HerokuAPI = require('heroku.js');
var api = new HerokuAPI({"apiKey" : apiKey});

Instantiate HerokuAPI with an email address and API token

var HerokuAPI = require('heroku.js');
var api = new HerokuAPI({"email" : email, "apiToken" : apiToken});

Instantiate HerokuAPI with a username and password

var HerokuAPI = require('heroku.js');

// This call is asyncronous, and requires a callback.
new HerokuAPI({ "username" : username, "password" : password }, function(api) {
  
});
var api = new HerokuAPI({"email" : email, "apiToken" : apiToken});

Create an application on the cedar stack

var api = new HerokuAPI(apiKey);
var app = api.createApp({
  "stack" : "Cedar",
  "name" : "MyApp"
});

List applications

var api = new HerokuAPI(apiKey);
var apps = api.listApps();
for (var i=0; l=apps.length; i<l; i++) {
  console.log(app.name);
}

Add Config

var api = new HerokuAPI(apiKey);
api.addConfig("myExistingApp", { "SOME_KEY" : "SOMEVALUE" });

Get Config

var api = new HerokuAPI(apiKey);
var config = api.listConfig("myExistingApp");
console.log(config);

Remove Config

var api = new HerokuAPI(apiKey);
var config = api.removeConfig("myExistingApp", "SOME_KEY");

Building Locally

1 Clone the repository

git clone https://github.com/dncrews/heroku.js.git

2 Run the testing suite

npm test