Class: SnapDeploy::Provider::Heroku::API::App

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.rb

Overview

An app represents the program that you would like to deploy and run on Heroku.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ App

Returns a new instance of App.



609
610
611
# File 'lib/snap_deploy/provider/heroku/api.rb', line 609

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a new app.

Parameters:

  • body:

    the object to pass as the request payload



616
617
618
# File 'lib/snap_deploy/provider/heroku/api.rb', line 616

def create(body)
  @client.app.create(body)
end

#delete(app_id_or_app_name) ⇒ Object

Delete an existing app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



623
624
625
# File 'lib/snap_deploy/provider/heroku/api.rb', line 623

def delete(app_id_or_app_name)
  @client.app.delete(app_id_or_app_name)
end

#info(app_id_or_app_name) ⇒ Object

Info for existing app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



630
631
632
# File 'lib/snap_deploy/provider/heroku/api.rb', line 630

def info(app_id_or_app_name)
  @client.app.info(app_id_or_app_name)
end

#listObject

List existing apps.



635
636
637
# File 'lib/snap_deploy/provider/heroku/api.rb', line 635

def list()
  @client.app.list()
end

#update(app_id_or_app_name, body) ⇒ Object

Update an existing app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



643
644
645
# File 'lib/snap_deploy/provider/heroku/api.rb', line 643

def update(app_id_or_app_name, body)
  @client.app.update(app_id_or_app_name, body)
end