Sha256: 8795f59b6eb653ecab95e22faa1623ffa36fcf7402408c96fb6624fc5cdaf926

Contents?: true

Size: 1.2 KB

Versions: 22

Compression:

Stored size: 1.2 KB

Contents

module Heroku
  class API

    # DELETE /apps/:app
    def delete_app(app)
      request(
        :expects  => 200,
        :method   => :delete,
        :path     => "/apps/#{app}"
      )
    end

    # GET /apps
    def get_apps
      request(
        :expects  => 200,
        :method   => :get,
        :path     => "/apps"
      )
    end

    # GET /apps/:app
    def get_app(app)
      request(
        :expects  => 200,
        :method   => :get,
        :path     => "/apps/#{app}"
      )
    end

    # POST /apps
    def post_app(params={})
      request(
        :expects  => 202,
        :method   => :post,
        :path     => '/apps',
        :query    => app_params(params)
      )
    end

    # POST /apps/:app/server/maintenance
    def post_app_maintenance(app, maintenance_mode)
      request(
        :expects  => 200,
        :method   => :post,
        :path     => "/apps/#{app}/server/maintenance",
        :query    => {'maintenance_mode' => maintenance_mode}
      )
    end

    # PUT /apps/:app
    def put_app(app, params)
      request(
        :expects  => 200,
        :method   => :put,
        :path     => "/apps/#{app}",
        :query    => app_params(params)
      )
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
heroku-api-0.2.13 lib/heroku/api/apps.rb
heroku-api-0.2.12 lib/heroku/api/apps.rb
heroku-api-0.2.11 lib/heroku/api/apps.rb
heroku-api-0.2.10 lib/heroku/api/apps.rb
heroku-api-0.2.9 lib/heroku/api/apps.rb
heroku-api-0.2.8 lib/heroku/api/apps.rb
heroku-api-0.2.7 lib/heroku/api/apps.rb
heroku-api-0.2.6 lib/heroku/api/apps.rb
heroku-api-0.2.5 lib/heroku/api/apps.rb
heroku-api-0.2.4 lib/heroku/api/apps.rb
heroku-api-0.2.3 lib/heroku/api/apps.rb
heroku-api-0.2.2 lib/heroku/api/apps.rb
heroku-api-0.2.1 lib/heroku/api/apps.rb
heroku-api-0.2.0 lib/heroku/api/apps.rb
heroku-api-0.1.8 lib/heroku/api/apps.rb
heroku-api-0.1.7 lib/heroku/api/apps.rb
heroku-api-0.1.6 lib/heroku/api/apps.rb
heroku-api-0.1.5 lib/heroku/api/apps.rb
heroku-api-0.1.4 lib/heroku/api/apps.rb
heroku-api-0.1.3 lib/heroku/api/apps.rb