module Toggl::Api::WorkspaceUser

Public Instance Methods

delete_workspace_user(uid) click to toggle source
# 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) click to toggle source

orkspace_user objects (the connection between user and workspace)

# 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) click to toggle source

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

# File lib/toggl_api/api/workspace_user.rb, line 11
def invite_users_to_workspace(wid, emails)
  post "/workspaces/#{wid}/invite",{:emails => emails}
end
relations_of_workspace_and_user(wid)
update_workspace_user(wuid, options) click to toggle source
# File lib/toggl_api/api/workspace_user.rb, line 15
def update_workspace_user(wuid, options)
  options = Hashie::Mash.new options
  post "/workspace_users/#{wuid}",(options.key?(:workspace_user) ? options : {:workspace_user => options})
end