Class: SemaphoreciApi::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/semaphoreci_api/client.rb

Overview

All aspects of team management

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Team

Returns a new instance of Team



138
139
140
# File 'lib/semaphoreci_api/client.rb', line 138

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new team.

Parameters:

  • org_username:

    unique username of organization

  • body:

    the object to pass as the request payload



146
147
148
# File 'lib/semaphoreci_api/client.rb', line 146

def create(org_username, body = {})
  @client.team.create(org_username, body)
end

#delete(team_id) ⇒ Object

Delete an existing team.

Parameters:

  • team_id:

    unique identifier of team



153
154
155
# File 'lib/semaphoreci_api/client.rb', line 153

def delete(team_id)
  @client.team.delete(team_id)
end

#info(team_id) ⇒ Object

Info for existing team.

Parameters:

  • team_id:

    unique identifier of team



160
161
162
# File 'lib/semaphoreci_api/client.rb', line 160

def info(team_id)
  @client.team.info(team_id)
end

#list(org_username) ⇒ Object

List existing teams for an org.

Parameters:

  • org_username:

    unique username of organization



167
168
169
# File 'lib/semaphoreci_api/client.rb', line 167

def list(org_username)
  @client.team.list(org_username)
end

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

Update an existing team.

Parameters:

  • team_id:

    unique identifier of team

  • body:

    the object to pass as the request payload



175
176
177
# File 'lib/semaphoreci_api/client.rb', line 175

def update(team_id, body = {})
  @client.team.update(team_id, body)
end