heroku-platform-api

Return to index link to github

Overview

A Java wrapper of Heroku Platform API.


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 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());

Latest release

Download - 0.9

Maven

    <repositories>
        <repository>
            <id>jp.co.flect</id>
            <name>FLECT maven repository</name>
            <url>http://flect.github.io/maven-repo/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>jp.co.flect</groupId>
            <artifactId>heroku-platform-api</artifactId>
            <version>0.9</version>
        </dependency>
    </dependencies>

License

MIT