Class: PlatformAPI::App

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.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.



914
915
916
# File 'lib/platform-api/client.rb', line 914

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



921
922
923
# File 'lib/platform-api/client.rb', line 921

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



928
929
930
# File 'lib/platform-api/client.rb', line 928

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



935
936
937
# File 'lib/platform-api/client.rb', line 935

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

#listObject

List existing apps.



940
941
942
# File 'lib/platform-api/client.rb', line 940

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

#list_owned_and_collaborated(account_email_or_account_id_or_account_self) ⇒ Object

List owned and collaborated apps (excludes organization apps).

Parameters:

  • account_email_or_account_id_or_account_self:

    unique email address of account or unique identifier of an account or Implicit reference to currently authorized user



947
948
949
# File 'lib/platform-api/client.rb', line 947

def list_owned_and_collaborated()
  @client.app.list_owned_and_collaborated()
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



955
956
957
# File 'lib/platform-api/client.rb', line 955

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