Class: PlatformAPI::TeamMember
- Inherits:
-
Object
- Object
- PlatformAPI::TeamMember
- Defined in:
- lib/platform-api/client.rb
Overview
A team member is an individual with access to a team.
Instance Method Summary collapse
-
#create(team_name_or_team_id, body = {}) ⇒ Object
Create a new team member.
-
#create_or_update(team_name_or_team_id, body = {}) ⇒ Object
Create a new team member, or update their role.
-
#delete(team_name_or_team_id, team_member_email_or_team_member_id) ⇒ Object
Remove a member from the team.
-
#initialize(client) ⇒ TeamMember
constructor
A new instance of TeamMember.
-
#list(team_name_or_team_id) ⇒ Object
List members of the team.
-
#list_by_member(team_name_or_team_id, team_member_email_or_team_member_id) ⇒ Object
List the apps of a team member.
-
#update(team_name_or_team_id, body = {}) ⇒ Object
Update a team member.
Constructor Details
#initialize(client) ⇒ TeamMember
Returns a new instance of TeamMember.
3273 3274 3275 |
# File 'lib/platform-api/client.rb', line 3273 def initialize(client) @client = client end |
Instance Method Details
#create(team_name_or_team_id, body = {}) ⇒ Object
Create a new team member.
3289 3290 3291 |
# File 'lib/platform-api/client.rb', line 3289 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.
3281 3282 3283 |
# File 'lib/platform-api/client.rb', line 3281 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.
3305 3306 3307 |
# File 'lib/platform-api/client.rb', line 3305 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.
3312 3313 3314 |
# File 'lib/platform-api/client.rb', line 3312 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.
3320 3321 3322 |
# File 'lib/platform-api/client.rb', line 3320 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.
3297 3298 3299 |
# File 'lib/platform-api/client.rb', line 3297 def update(team_name_or_team_id, body = {}) @client.team_member.update(team_name_or_team_id, body) end |