Giter Site home page Giter Site logo

heroku-platform-api's Introduction

Heroku Platform API

Overview

Java wrapper of Heroku Platform API.

https://devcenter.heroku.com/articles/platform-api-reference

Implemented features

  • RateLimitRating
  • Account
  • AccountFeature
  • Addon
  • AddonService
  • App
  • AppFeature
  • AppTransfer
  • Collaborator
  • Config
  • Domain
  • Dyno
  • Formation
  • Key
  • LogDrain
  • LogSession
  • OAuthAuthorization
  • OAuthClient
  • OAuthToken
  • Plan
  • Region
  • Release
  • SSLEndpoint
  • Stack

Not implemented features

None(2013-12-06)

Usage

JavaDoc

//Get the url of Heroku authentication page.
String oauthUrl = PlatformApi.getOAuthUrl("<YOUR_CLIENT_ID>", Scope.Global);

//... Authenticate and get code.

PlatformApi api = PlatformApi.fromOAuth("<YOUR_CLIENT_SECRET>", code);

//Get application list
List<App> appList = api.getAppList();
App app = appList.get(0);

//heroku ps:scale web=5
Formation api.updateFormation(app.getName(), "web", 5, 1);

//heroku ps:restart
api.restart(app.getName());

License

MIT

heroku-platform-api's People

Contributors

shunjikonishi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

heroku-platform-api's Issues

PlatformApi#createSlug() fails with an NPE

When I try to create and upload a slug via PlatformApi#createSlug() it fails with the following stack trace:

Exception in thread "main" java.lang.NullPointerException
    at java.net.URI$Parser.parse(URI.java:3042)
    at java.net.URI.<init>(URI.java:588)
    at java.net.URI.create(URI.java:850)
    at org.apache.http.client.methods.HttpPut.<init>(HttpPut.java:68)
    at jp.co.flect.heroku.transport.HttpClientTransport.execute(HttpClientTransport.java:54)
    at jp.co.flect.heroku.platformapi.PlatformApi.createSlug(PlatformApi.java:627)
    at jp.co.flect.heroku.platformapi.PlatformApi.createSlug(PlatformApi.java:609)

This seems to be caused by Slug#getBlobPut() looking for the upload URL as "blob.put" in its internal object map. However "blob" in that map is an object that looks like this:

{
    "method": "put",
    "url": "https://s3-external-1.amazonaws.com/herokuslugs/heroku.com/..."
}

(I did modify the pom.xml to depend directly on org.apache.httpcomponents.httpmine and org.apache.httpcomponents.httpclient, and excluded the rest, but I don't think it is related.)

Oh and thanks for putting this project together, it's exatly what I need for easily uploading apps to Heroku!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.