Class: Projects::Api::TasklistsAPI
- Inherits:
-
API
- Object
- API
- Projects::Api::TasklistsAPI
show all
- Includes:
- Parser, Util
- Defined in:
- lib/projects/api/TasklistsAPI.rb
Instance Method Summary
collapse
Methods inherited from API
#getBaseURL, #getQueryMap
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
- * tasklist
Returns
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
- * tasklistId
Returns
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
- * queryMap
- This queryMap contains the filters in the form of key-value pair.
Returns
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
- * tasklist
Returns
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
|