Module: BacklogKit::Client::Team

Included in:
BacklogKit::Client
Defined in:
lib/backlog_kit/client/team.rb

Overview

Methods for the Team API

Instance Method Summary collapse

Instance Method Details

#create_team(name, params = {}) ⇒ BacklogKit::Response

Create a new team

Parameters:

  • name (String)

    Team name

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



26
27
28
29
# File 'lib/backlog_kit/client/team.rb', line 26

def create_team(name, params = {})
  params[:name] = name
  post('teams', params)
end

#delete_team(team_id) ⇒ BacklogKit::Response

Delete a team

Parameters:

  • team_id (Integer, String)

    Team id

Returns:



44
45
46
# File 'lib/backlog_kit/client/team.rb', line 44

def delete_team(team_id)
  delete("teams/#{team_id}")
end

#download_team_icon(team_id) ⇒ BacklogKit::Response

Download a team icon image

Parameters:

  • team_id (Integer, String)

    Team id

Returns:



52
53
54
# File 'lib/backlog_kit/client/team.rb', line 52

def download_team_icon(team_id)
  get("teams/#{team_id}/icon")
end

#get_team(team_id) ⇒ BacklogKit::Response

Get a team

Parameters:

  • team_id (Integer, String)

    Team id

Returns:



17
18
19
# File 'lib/backlog_kit/client/team.rb', line 17

def get_team(team_id)
  get("teams/#{team_id}")
end

#get_teams(params = {}) ⇒ BacklogKit::Response

Get list of teams

Parameters:

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



9
10
11
# File 'lib/backlog_kit/client/team.rb', line 9

def get_teams(params = {})
  get('teams', params)
end

#update_team(team_id, params = {}) ⇒ BacklogKit::Response

Update a team

Parameters:

  • team_id (Integer, String)

    Team id

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



36
37
38
# File 'lib/backlog_kit/client/team.rb', line 36

def update_team(team_id, params = {})
  patch("teams/#{team_id}", params)
end