Module: Toggl::Api::WorkspaceUser
- Included in:
- Base
- Defined in:
- lib/toggl_api/api/workspace_user.rb
Instance Method Summary collapse
- #delete_workspace_user(uid) ⇒ Object
-
#get_relations_of_workspace_and_user(wid) ⇒ Object
(also: #relations_of_workspace_and_user)
orkspace_user objects (the connection between user and workspace).
-
#invite_users_to_workspace(wid, emails) ⇒ Object
id: workspace user id (integer) uid: user id of the workspace user (integer) admin: if user is workspace admin (boolean) active: if the workspace user has accepted the invitation to this workspace (boolean) invite_url: if user has not accepted the invitation the url for accepting his/her invitation is sent when the request is made by workspace_admin.
- #update_workspace_user(wuid, options) ⇒ Object
Instance Method Details
#delete_workspace_user(uid) ⇒ Object
20 21 22 |
# File 'lib/toggl_api/api/workspace_user.rb', line 20 def delete_workspace_user(uid) delete "/workspace_users/#{uid}" end |
#get_relations_of_workspace_and_user(wid) ⇒ Object Also known as: relations_of_workspace_and_user
orkspace_user objects (the connection between user and workspace)
25 26 27 |
# File 'lib/toggl_api/api/workspace_user.rb', line 25 def get_relations_of_workspace_and_user(wid) get "/workspaces/#{wid}/workspace_users" end |
#invite_users_to_workspace(wid, emails) ⇒ Object
id: workspace user id (integer) uid: user id of the workspace user (integer) admin: if user is workspace admin (boolean) active: if the workspace user has accepted the invitation to this workspace (boolean) invite_url: if user has not accepted the invitation the url for accepting his/her invitation is sent when the request is made by workspace_admin
11 12 13 |
# File 'lib/toggl_api/api/workspace_user.rb', line 11 def invite_users_to_workspace(wid, emails) post "/workspaces/#{wid}/invite",{:emails => emails} end |
#update_workspace_user(wuid, options) ⇒ Object
15 16 17 18 |
# File 'lib/toggl_api/api/workspace_user.rb', line 15 def update_workspace_user(wuid, ) = Hashie::Mash.new post "/workspace_users/#{wuid}",(.key?(:workspace_user) ? : {:workspace_user => }) end |