Module: Caplinked::REST::Teams
- Included in:
- API
- Defined in:
- lib/caplinked/rest/teams.rb
Instance Method Summary collapse
- #add_team_member(options = {}) ⇒ Object
- #create_team(options = {}) ⇒ Object
- #get_list_of_team_members(options = {}) ⇒ Object
- #get_list_of_team_watermarks(options = {}) ⇒ Object
- #get_list_of_teams(options = {}) ⇒ Object
- #get_team_info(options = {}) ⇒ Object
- #remove_team_member(options = {}) ⇒ Object
- #update_team_info(options = {}) ⇒ Object
Instance Method Details
#add_team_member(options = {}) ⇒ Object
26 27 28 29 30 |
# File 'lib/caplinked/rest/teams.rb', line 26 def add_team_member( = {}) body = .stringify_keys.slice('id', 'user_id', 'email') id = body.delete('id') perform_post('/api/v1/teams/' + id.to_s + '/memberships', {}, body.to_json, { 'Content-Type' => 'application/json' } ) end |
#create_team(options = {}) ⇒ Object
5 6 7 8 |
# File 'lib/caplinked/rest/teams.rb', line 5 def create_team( = {}) body = .stringify_keys.slice('team') perform_post('/api/v1/teams', {}, body.to_json, {'Content-Type' => 'application/json'} ) end |
#get_list_of_team_members(options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/caplinked/rest/teams.rb', line 38 def get_list_of_team_members( = {}) params = .stringify_keys.slice('id') id = params.delete('id') perform_get('/api/v1/teams/' + id.to_s + '/memberships', nil ) end |
#get_list_of_team_watermarks(options = {}) ⇒ Object
44 45 46 47 48 |
# File 'lib/caplinked/rest/teams.rb', line 44 def get_list_of_team_watermarks( = {}) params = .stringify_keys.slice('id') id = params.delete('id') perform_get('/api/v1/teams/' + id.to_s + '/watermark_settings', nil ) end |
#get_list_of_teams(options = {}) ⇒ Object
10 11 12 |
# File 'lib/caplinked/rest/teams.rb', line 10 def get_list_of_teams( = {}) perform_get('/api/v1/teams') end |
#get_team_info(options = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/caplinked/rest/teams.rb', line 14 def get_team_info( = {}) params = .stringify_keys.slice('id') id = params.delete('id') perform_get('/api/v1/teams/' + id.to_s, nil ) end |
#remove_team_member(options = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/caplinked/rest/teams.rb', line 32 def remove_team_member( = {}) body = .stringify_keys.slice('id', 'user_id') id = body.delete('id') perform_delete('/api/v1/teams/' + id.to_s + '/memberships', {}, body.to_json, { 'Content-Type' => 'application/json' } ) end |
#update_team_info(options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/caplinked/rest/teams.rb', line 20 def update_team_info( = {}) body = .stringify_keys.slice('id', 'team') id = body.delete('id') perform_put('/api/v1/teams/' + id.to_s, {}, body.to_json, { 'Content-Type' => 'application/json' } ) end |