Class: Projects::Api::UsersAPI

Inherits:
API
  • Object
show all
Includes:
Parser, Util
Defined in:
lib/projects/api/UsersAPI.rb

Overview

  • UsersAPI is used to get list of users for the project.

Instance Method Summary collapse

Methods inherited from API

#getBaseURL, #getQueryMap

Constructor Details

#initialize(authToken, portalId) ⇒ UsersAPI

  • Construct a new UsersAPI using User’s authToken and portalId.

Parameters

  • authToken
    • User’s authToken.

  • portalId
    • User’s portalId.



27
28
29
# File 'lib/projects/api/UsersAPI.rb', line 27

def initialize(authToken,portalId)
  super(authToken,portalId)
end

Instance Method Details

#getUsers(projectId) ⇒ Object

  • Get list of users for the project.

Parameters

  • projectId
    • ID of the project.

Returns

  • List of User object.



41
42
43
44
45
# File 'lib/projects/api/UsersAPI.rb', line 41

def getUsers(projectId)
  url = getBaseURL+"projects/"+String(projectId)+"/users/"   
  response = ZohoHTTPClient.get(url, getQueryMap)    
  return $userParser.getUsers(response)
end