Class: Projects::Api::TasklistsAPI
- Defined in:
- lib/projects/api/TasklistsAPI.rb
Instance Method Summary collapse
-
#create(projectId, tasklist) ⇒ Object
-
Create a new tasklist for the project.
-
-
#delete(projectId, tasklistId) ⇒ Object
-
Delete an existing tasklist for the project.
-
-
#getTasklists(projectId, queryMap) ⇒ Object
-
Get list of tasklists for the project.
-
-
#initialize(authToken, portalId) ⇒ TasklistsAPI
constructor
A new instance of TasklistsAPI.
-
#update(projectId, tasklist) ⇒ Object
-
Update the details of a tasklist.
-
Methods inherited from API
Constructor Details
#initialize(authToken, portalId) ⇒ TasklistsAPI
Returns a new instance of TasklistsAPI.
36 37 38 |
# File 'lib/projects/api/TasklistsAPI.rb', line 36 def initialize(authToken,portalId) super(authToken,portalId) end |
Instance Method Details
#create(projectId, tasklist) ⇒ Object
-
Create a new tasklist for the project.
Parameters
- projectId
-
ID of the project.
-
- tasklist
-
tasklist object.
-
Returns
-
Tasklist object.
70 71 72 73 74 |
# File 'lib/projects/api/TasklistsAPI.rb', line 70 def create(projectId,tasklist) url = getBaseURL+"projects/"+String(projectId)+"/tasklists/" response = ZohoHTTPClient.post(url, getQueryMap, tasklist.toParamMAP) return $tasklistParser.getTasklist(response) end |
#delete(projectId, tasklistId) ⇒ Object
-
Delete an existing tasklist for the project.
Parameters
- projectId
-
ID of the project.
-
- tasklistId
-
ID of the tasklist.
-
Returns
-
String object.
106 107 108 109 110 |
# File 'lib/projects/api/TasklistsAPI.rb', line 106 def delete(projectId, tasklistId) url = getBaseURL+"projects/"+String(projectId)+"/tasklists/"+String(tasklistId)+"/" response = ZohoHTTPClient.delete(url, getQueryMap) return $tasklistParser.getResult(response) end |
#getTasklists(projectId, queryMap) ⇒ Object
-
Get list of tasklists for the project.
Parameters
- projectId
-
ID of the project.
-
- queryMap
-
This queryMap contains the filters in the form of key-value pair.
-
Returns
-
List of Tasklist object.
52 53 54 55 56 |
# File 'lib/projects/api/TasklistsAPI.rb', line 52 def getTasklists(projectId,queryMap) url = getBaseURL+"projects/"+String(projectId)+"/tasklists/" response = ZohoHTTPClient.get(url, getQueryMap(queryMap)) return $tasklistParser.getTasklists(response) end |
#update(projectId, tasklist) ⇒ Object
-
Update the details of a tasklist.
Parameters
- projectId
-
ID of the project.
-
- tasklist
-
Tasklist object.
-
Returns
-
Tasklist object.
88 89 90 91 92 |
# File 'lib/projects/api/TasklistsAPI.rb', line 88 def update(projectId,tasklist) url = getBaseURL+"projects/"+String(projectId)+"/tasklists/"+String(tasklist.getId)+"/" response = ZohoHTTPClient.post(url, getQueryMap, tasklist.toParamMAP) return $tasklistParser.getTasklist(response) end |