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.



3201
3202
3203
# File 'lib/platform-api/client.rb', line 3201

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



3208
3209
3210
# File 'lib/platform-api/client.rb', line 3208

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

#info(team_app_identity) ⇒ Object

Info for a team app.

Parameters:

  • team_app_identity:


3215
3216
3217
# File 'lib/platform-api/client.rb', line 3215

def info(team_app_identity)
  @client.team_app.info(team_app_identity)
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



3246
3247
3248
# File 'lib/platform-api/client.rb', line 3246

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

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

Transfer an existing team app to another Heroku account.

Parameters:

  • team_app_identity:
  • body:

    the object to pass as the request payload



3231
3232
3233
# File 'lib/platform-api/client.rb', line 3231

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

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

Transfer an existing team app to another team.

Parameters:

  • team_app_identity:
  • body:

    the object to pass as the request payload



3239
3240
3241
# File 'lib/platform-api/client.rb', line 3239

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

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

Lock or unlock a team app.

Parameters:

  • team_app_identity:
  • body:

    the object to pass as the request payload



3223
3224
3225
# File 'lib/platform-api/client.rb', line 3223

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