Class: PlatformAPI::TeamApp

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

A team app encapsulates the team specific functionality of Heroku apps.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TeamApp

Returns a new instance of TeamApp.



3182
3183
3184
# File 'lib/platform-api/client.rb', line 3182

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new app in the specified team, in the default team if unspecified, or in personal account, if default team is not set.

Parameters:

  • body:

    the object to pass as the request payload



3189
3190
3191
# File 'lib/platform-api/client.rb', line 3189

def create(body = {})
  @client.team_app.create(body)
end

#info(app_name) ⇒ Object

Info for a team app.

Parameters:

  • app_name:

    unique name of app



3196
3197
3198
# File 'lib/platform-api/client.rb', line 3196

def info(app_name)
  @client.team_app.info(app_name)
end

#list_by_team(team_name_or_team_id) ⇒ Object

List team apps.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team



3227
3228
3229
# File 'lib/platform-api/client.rb', line 3227

def list_by_team(team_name_or_team_id)
  @client.team_app.list_by_team(team_name_or_team_id)
end

#transfer_to_account(app_name, body = {}) ⇒ Object

Transfer an existing team app to another Heroku account.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



3212
3213
3214
# File 'lib/platform-api/client.rb', line 3212

def (app_name, body = {})
  @client.team_app.(app_name, body)
end

#transfer_to_team(app_name, body = {}) ⇒ Object

Transfer an existing team app to another team.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



3220
3221
3222
# File 'lib/platform-api/client.rb', line 3220

def transfer_to_team(app_name, body = {})
  @client.team_app.transfer_to_team(app_name, body)
end

#update_locked(app_name, body = {}) ⇒ Object

Lock or unlock a team app.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



3204
3205
3206
# File 'lib/platform-api/client.rb', line 3204

def update_locked(app_name, body = {})
  @client.team_app.update_locked(app_name, body)
end