heroku-clj

Heroku API via Clojure

Stars
6

heroku-clj

The Heroku API is useful and awesome. This is a Clojure client for accessing the API.

Usage

All requests require an API key and return a response as JSON.

Your API key can be found under account settings on Heroku.

End points

  • Addons
  • Apps
  • Collaborators
  • Config
  • Domains
  • Keys
  • Logs
  • Processes
  • Releases
  • Stacks

Addons

List all addons (only returns the addon name by default)

(addons "YOURAPIKEY")

List addons for an application

(addons "YOURAPIKEY" "YOURAPP")

Create a new addon

(create-addon "YOURAPIKEY" "YOURAPP" "dbinsights:basic")

Apps

List all your apps on Heroku

(app "YOURAPIKEY")

Show info for a single app

(app "YOURAPIKEY" "myapp")

Create a new app

(create-app "myapp" "cedar")

Processes

Show process information for an app

(list-processes "YOURAPIKEY" "myapp")

Alternative DSL

If you don't want to pass an API key to every function you can use with-key to make things easier

First you need to set your api-key globally.

(set-api-key! "YOURKEY")

Then you can use with-key to call functions without having to pass in the api key

(with-key apps "forwardio")

License

Copyright © 2013 Owain Lewis

Distributed under the Eclipse Public License, the same as Clojure.