Class: PlatformAPI::TeamMember

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

Overview

A team member is an individual with access to a team.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TeamMember

Returns a new instance of TeamMember.



3267
3268
3269
# File 'lib/platform-api/client.rb', line 3267

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new team member.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • body:

    the object to pass as the request payload



3283
3284
3285
# File 'lib/platform-api/client.rb', line 3283

def create(team_name_or_team_id, body = {})
  @client.team_member.create(team_name_or_team_id, body)
end

#create_or_update(team_name_or_team_id, body = {}) ⇒ Object

Create a new team member, or update their role.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • body:

    the object to pass as the request payload



3275
3276
3277
# File 'lib/platform-api/client.rb', line 3275

def create_or_update(team_name_or_team_id, body = {})
  @client.team_member.create_or_update(team_name_or_team_id, body)
end

#delete(team_name_or_team_id, team_member_email_or_team_member_id) ⇒ Object

Remove a member from the team.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • team_member_email_or_team_member_id:

    email address of the team member or unique identifier of the team member



3299
3300
3301
# File 'lib/platform-api/client.rb', line 3299

def delete(team_name_or_team_id, team_member_email_or_team_member_id)
  @client.team_member.delete(team_name_or_team_id, team_member_email_or_team_member_id)
end

#list(team_name_or_team_id) ⇒ Object

List members of the team.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team



3306
3307
3308
# File 'lib/platform-api/client.rb', line 3306

def list(team_name_or_team_id)
  @client.team_member.list(team_name_or_team_id)
end

#list_by_member(team_name_or_team_id, team_member_email_or_team_member_id) ⇒ Object

List the apps of a team member.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • team_member_email_or_team_member_id:

    email address of the team member or unique identifier of the team member



3314
3315
3316
# File 'lib/platform-api/client.rb', line 3314

def list_by_member(team_name_or_team_id, team_member_email_or_team_member_id)
  @client.team_member.list_by_member(team_name_or_team_id, team_member_email_or_team_member_id)
end

#update(team_name_or_team_id, body = {}) ⇒ Object

Update a team member.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • body:

    the object to pass as the request payload



3291
3292
3293
# File 'lib/platform-api/client.rb', line 3291

def update(team_name_or_team_id, body = {})
  @client.team_member.update(team_name_or_team_id, body)
end