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.



1419
1420
1421
# File 'lib/platform-api/client.rb', line 1419

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



1426
1427
1428
# File 'lib/platform-api/client.rb', line 1426

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



1433
1434
1435
# File 'lib/platform-api/client.rb', line 1433

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

#disable_acm(app_id_or_app_name) ⇒ Object

Disable ACM flag for an app

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1474
1475
1476
# File 'lib/platform-api/client.rb', line 1474

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

#enable_acm(app_id_or_app_name) ⇒ Object

Enable ACM flag for an app

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1467
1468
1469
# File 'lib/platform-api/client.rb', line 1467

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



1440
1441
1442
# File 'lib/platform-api/client.rb', line 1440

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

#listObject

List existing apps.



1445
1446
1447
# File 'lib/platform-api/client.rb', line 1445

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 team 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



1452
1453
1454
# File 'lib/platform-api/client.rb', line 1452

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

#refresh_acm(app_id_or_app_name) ⇒ Object

Refresh ACM for an app

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1481
1482
1483
# File 'lib/platform-api/client.rb', line 1481

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



1460
1461
1462
# File 'lib/platform-api/client.rb', line 1460

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