Class: Teamlab::Group
- Inherits:
-
Object
- Object
- Teamlab::Group
- Includes:
- GroupHelper
- Defined in:
- lib/teamlab/modules/group.rb
Instance Method Summary collapse
- #add_group(manager, name, members = []) ⇒ Object
- #add_group_users(group_id, members = []) ⇒ Object
- #delete_group(group_id) ⇒ Object
- #get_group(group_id) ⇒ Object
- #get_groups ⇒ Object
-
#initialize(config = nil) ⇒ Group
constructor
A new instance of Group.
- #move_group_members(group_id, new_group_id) ⇒ Object
- #remove_group_members(group_id, members = []) ⇒ Object
- #replace_members(group_id, members) ⇒ Object
- #set_group_manager(group_id, user_id) ⇒ Object
- #update_group(group_id, options = {}) ⇒ Object
Methods included from GroupHelper
Constructor Details
Instance Method Details
#add_group(manager, name, members = []) ⇒ Object
21 22 23 |
# File 'lib/teamlab/modules/group.rb', line 21 def add_group(manager, name, members = []) @request.post('', groupManager: manager, groupName: name, members: members) end |
#add_group_users(group_id, members = []) ⇒ Object
33 34 35 |
# File 'lib/teamlab/modules/group.rb', line 33 def add_group_users(group_id, members = []) @request.put([group_id.to_s, 'members'], members: members) end |
#delete_group(group_id) ⇒ Object
45 46 47 |
# File 'lib/teamlab/modules/group.rb', line 45 def delete_group(group_id) @request.delete([group_id.to_s]) end |
#get_group(group_id) ⇒ Object
17 18 19 |
# File 'lib/teamlab/modules/group.rb', line 17 def get_group(group_id) @request.get([group_id.to_s]) end |
#get_groups ⇒ Object
13 14 15 |
# File 'lib/teamlab/modules/group.rb', line 13 def get_groups @request.get end |
#move_group_members(group_id, new_group_id) ⇒ Object
41 42 43 |
# File 'lib/teamlab/modules/group.rb', line 41 def move_group_members(group_id, new_group_id) @request.put([group_id.to_s, 'members', new_group_id.to_s]) end |
#remove_group_members(group_id, members = []) ⇒ Object
49 50 51 |
# File 'lib/teamlab/modules/group.rb', line 49 def remove_group_members(group_id, members = []) @request.delete([group_id.to_s, 'members'], members: members) end |
#replace_members(group_id, members) ⇒ Object
25 26 27 |
# File 'lib/teamlab/modules/group.rb', line 25 def replace_members(group_id, members) @request.post([group_id.to_s, 'members'], members: members) end |
#set_group_manager(group_id, user_id) ⇒ Object
37 38 39 |
# File 'lib/teamlab/modules/group.rb', line 37 def set_group_manager(group_id, user_id) @request.put([group_id.to_s, 'manager'], userid: user_id) end |
#update_group(group_id, options = {}) ⇒ Object
29 30 31 |
# File 'lib/teamlab/modules/group.rb', line 29 def update_group(group_id, = {}) @request.put([group_id.to_s], ) end |