class MustardClient::TeamsClient
Public Instance Methods
add(team_params)
click to toggle source
# File lib/MustardClient/teams.rb, line 27 def add team_params command = {} command[:method] = :post command[:route] = @mustard_url + "/teams" command[:params] = {team: team_params} command[:headers] = {'User-Token' => @user_token} execute(command) end
add_project(team_id, project_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 73 def add_project team_id, project_id command = {} command[:method] = :post command[:route] = @mustard_url + "/teams/#{team_id}/project/#{ project_id }" command[:headers] = {'User-Token' => @user_token} execute(command) end
add_user(team_id, user_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 62 def add_user team_id, user_id command = {} command[:method] = :post command[:route] = @mustard_url + "/teams/#{team_id}/user/#{ user_id }" command[:headers] = {'User-Token' => @user_token} execute(command) end
all()
click to toggle source
# File lib/MustardClient/teams.rb, line 5 def all command = {} command[:method] = :get command[:route] = @mustard_url + '/teams' command[:headers] = {'User-Token' => @user_token} execute(command) end
delete(team_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 39 def delete team_id command = {} command[:method] = :delete command[:route] = @mustard_url + "/teams/#{team_id}" command[:headers] = {'User-Token' => @user_token} execute(command) end
find(team_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 16 def find team_id command = {} command[:method] = :get command[:route] = @mustard_url + "/teams/#{team_id}" command[:headers] = {'User-Token' => @user_token} execute(command) end
remove_project(team_id, project_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 95 def remove_project team_id, project_id command = {} command[:method] = :delete command[:route] = @mustard_url + "/teams/#{team_id}/project/#{ project_id }" command[:headers] = {'User-Token' => @user_token} execute(command) end
remove_user(team_id, user_id)
click to toggle source
# File lib/MustardClient/teams.rb, line 84 def remove_user team_id, user_id command = {} command[:method] = :delete command[:route] = @mustard_url + "/teams/#{team_id}/user/#{ user_id }" command[:headers] = {'User-Token' => @user_token} execute(command) end
update(team_id, team_params)
click to toggle source
# File lib/MustardClient/teams.rb, line 50 def update team_id, team_params command = {} command[:method] = :put command[:route] = @mustard_url + "/teams/#{team_id}" command[:headers] = {'User-Token' => @user_token} command[:params] = {team: team_params} execute(command) end