Class: PlatformAPI::TeamAppCollaborator

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

Overview

A team collaborator represents an account that has been given access to a team app on Heroku.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TeamAppCollaborator

Returns a new instance of TeamAppCollaborator.



3012
3013
3014
# File 'lib/platform-api/client.rb', line 3012

def initialize(client)
  @client = client
end

Instance Method Details

#create(app_id_or_app_name, body = {}) ⇒ Object

Create a new collaborator on a team app. Use this endpoint instead of the /apps/{app_id_or_name}/collaborator endpoint when you want the collaborator to be granted permissions according to their role in the team.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



3020
3021
3022
# File 'lib/platform-api/client.rb', line 3020

def create(app_id_or_app_name, body = {})
  @client.team_app_collaborator.create(app_id_or_app_name, body)
end

#delete(app_name, collaborator_email) ⇒ Object

Delete an existing collaborator from a team app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator



3028
3029
3030
# File 'lib/platform-api/client.rb', line 3028

def delete(app_name, collaborator_email)
  @client.team_app_collaborator.delete(app_name, collaborator_email)
end

#info(app_name, collaborator_email) ⇒ Object

Info for a collaborator on a team app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator



3036
3037
3038
# File 'lib/platform-api/client.rb', line 3036

def info(app_name, collaborator_email)
  @client.team_app_collaborator.info(app_name, collaborator_email)
end

#list(app_name) ⇒ Object

List collaborators on a team app.

Parameters:

  • app_name:

    unique name of app



3052
3053
3054
# File 'lib/platform-api/client.rb', line 3052

def list(app_name)
  @client.team_app_collaborator.list(app_name)
end

#update(app_name, collaborator_email, body = {}) ⇒ Object

Update an existing collaborator from a team app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator

  • body:

    the object to pass as the request payload



3045
3046
3047
# File 'lib/platform-api/client.rb', line 3045

def update(app_name, collaborator_email, body = {})
  @client.team_app_collaborator.update(app_name, collaborator_email, body)
end