class Projects::Api::TasklistsAPI

Public Class Methods

new(authToken,portalId) click to toggle source
  • Construct a new TasklistsAPI using User's authToken and portalId.

Parameters

  • authToken
    • User's authToken.

  • portalId
    • User's portalId.

Calls superclass method Projects::Api::API::new
# File lib/projects/api/TasklistsAPI.rb, line 36
def initialize(authToken,portalId)
        super(authToken,portalId)
end

Public Instance Methods

create(projectId,tasklist) click to toggle source
  • Create a new tasklist for the project.

Parameters

  • projectId
    • ID of the project.

  • tasklist
    • tasklist object.

Returns

  • Tasklist object.

# 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) click to toggle source
  • Delete an existing tasklist for the project.

Parameters

  • projectId
    • ID of the project.

  • tasklistId
    • ID of the tasklist.

Returns

  • String object.

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

# 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) click to toggle source
  • Update the details of a tasklist.

Parameters

  • projectId
    • ID of the project.

  • tasklist
    • Tasklist object.

Returns

  • Tasklist object.

# 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