Module: Teams
- Included in:
- Config
- Defined in:
- lib/user/config/teams.rb
Instance Method Summary collapse
-
#create_team(data) ⇒ Object
Create team.
-
#get_team(id) ⇒ Object
Get team.
-
#get_team_types ⇒ Object
Teams.
-
#get_teams ⇒ Object
Get teams.
-
#update_team(id, data) ⇒ Object
Update team.
Instance Method Details
#create_team(data) ⇒ Object
Create team.
Create a team with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Team',
team_type_enum: 1
}
@data = @mints_user.create_team(data)
50 51 52 |
# File 'lib/user/config/teams.rb', line 50 def create_team(data) @client.raw('post', '/config/teams', nil, data_transform(data)) end |
#get_team(id) ⇒ Object
Get team.
Get a team info.
Parameters
- id
-
(Integer) – Team id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
Example
@data = @mints_user.get_team(1)
34 35 36 |
# File 'lib/user/config/teams.rb', line 34 def get_team(id) @client.raw('get', "/config/teams/#{id}") end |
#get_team_types ⇒ Object
Teams
Get team types.
Get a collection of team types.
Example
@data = @mints_user.get_team_types
12 13 14 |
# File 'lib/user/config/teams.rb', line 12 def get_team_types @client.raw('get', '/config/teams/team-types') end |
#get_teams ⇒ Object
Get teams.
Get a collection of teams.
Example
@data = @mints_user.get_teams
21 22 23 |
# File 'lib/user/config/teams.rb', line 21 def get_teams @client.raw('get', '/config/teams') end |
#update_team(id, data) ⇒ Object
Update team.
Update a team info.
Parameters
- id
-
(Integer) – Team id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Team Modified',
team_type_enum: 1,
members: []
}
@data = @mints_user.update_team(5, data)
68 69 70 |
# File 'lib/user/config/teams.rb', line 68 def update_team(id, data) @client.raw('put', "/config/teams/#{id}", nil, data_transform(data)) end |