Class: Heroku::NewAPI
- Inherits:
-
API
- Object
- API
- Heroku::NewAPI
- Defined in:
- lib/heroku/new_api.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NewAPI
constructor
A new instance of NewAPI.
-
#post_release(app, query = {}) ⇒ Object
POST /apps/:app/releases/:release.
Constructor Details
#initialize(options = {}) ⇒ NewAPI
Returns a new instance of NewAPI.
5 6 7 8 9 |
# File 'lib/heroku/new_api.rb', line 5 def initialize(={}) [:headers] ||= {} [:headers]['Accept'] = 'application/vnd.heroku+json; version=3' super() end |
Instance Method Details
#post_release(app, query = {}) ⇒ Object
POST /apps/:app/releases/:release
12 13 14 15 16 17 18 19 |
# File 'lib/heroku/new_api.rb', line 12 def post_release(app, query={}) request( :expects => 201, :method => :post, :path => "/apps/#{app}/releases", :body => MultiJson.dump(query) ) end |