Class: PlatformAPI::Collaborator

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Collaborator

Returns a new instance of Collaborator.


1069
1070
1071
# File 'lib/platform-api/client.rb', line 1069

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new collaborator.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload


1077
1078
1079
# File 'lib/platform-api/client.rb', line 1077

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

#delete(app_id_or_app_name, collaborator_email_or_collaborator_id) ⇒ Object

Delete an existing collaborator.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • collaborator_email_or_collaborator_id:

    invited email address of collaborator or unique identifier of collaborator


1085
1086
1087
# File 'lib/platform-api/client.rb', line 1085

def delete(app_id_or_app_name, collaborator_email_or_collaborator_id)
  @client.collaborator.delete(app_id_or_app_name, collaborator_email_or_collaborator_id)
end

#info(app_id_or_app_name, collaborator_email_or_collaborator_id) ⇒ Object

Info for existing collaborator.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • collaborator_email_or_collaborator_id:

    invited email address of collaborator or unique identifier of collaborator


1093
1094
1095
# File 'lib/platform-api/client.rb', line 1093

def info(app_id_or_app_name, collaborator_email_or_collaborator_id)
  @client.collaborator.info(app_id_or_app_name, collaborator_email_or_collaborator_id)
end

#list(app_id_or_app_name) ⇒ Object

List existing collaborators.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app


1100
1101
1102
# File 'lib/platform-api/client.rb', line 1100

def list(app_id_or_app_name)
  @client.collaborator.list(app_id_or_app_name)
end