Google_TasksServiceResource

The "tasks" collection of methods.

Defined (2)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_TaskqueueService.php  
  1. class Google_TasksServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Insert a new task in a TaskQueue (tasks.insert) 
  6. * @param string $project The project under which the queue lies 
  7. * @param string $taskqueue The taskqueue to insert the task into 
  8. * @param Google_Task $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Task 
  11. */ 
  12. public function insert($project, $taskqueue, Google_Task $postBody, $optParams = array()) { 
  13. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('insert', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Task($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Get a particular task from a TaskQueue. (tasks.get) 
  22. * @param string $project The project under which the queue lies. 
  23. * @param string $taskqueue The taskqueue in which the task belongs. 
  24. * @param string $task The task to get properties of. 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_Task 
  27. */ 
  28. public function get($project, $taskqueue, $task, $optParams = array()) { 
  29. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('get', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_Task($data); 
  34. } else { 
  35. return $data; 
  36. /** 
  37. * List Tasks in a TaskQueue (tasks.list) 
  38. * @param string $project The project under which the queue lies. 
  39. * @param string $taskqueue The id of the taskqueue to list tasks from. 
  40. * @param array $optParams Optional parameters. 
  41. * @return Google_Tasks2 
  42. */ 
  43. public function listTasks($project, $taskqueue, $optParams = array()) { 
  44. $params = array('project' => $project, 'taskqueue' => $taskqueue); 
  45. $params = array_merge($params, $optParams); 
  46. $data = $this->__call('list', array($params)); 
  47. if ($this->useObjects()) { 
  48. return new Google_Tasks2($data); 
  49. } else { 
  50. return $data; 
  51. /** 
  52. * Update tasks that are leased out of a TaskQueue. (tasks.update) 
  53. * @param string $project The project under which the queue lies. 
  54. * @param string $taskqueue 
  55. * @param string $task 
  56. * @param int $newLeaseSeconds The new lease in seconds. 
  57. * @param Google_Task $postBody 
  58. * @param array $optParams Optional parameters. 
  59. * @return Google_Task 
  60. */ 
  61. public function update($project, $taskqueue, $task, $newLeaseSeconds, Google_Task $postBody, $optParams = array()) { 
  62. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody); 
  63. $params = array_merge($params, $optParams); 
  64. $data = $this->__call('update', array($params)); 
  65. if ($this->useObjects()) { 
  66. return new Google_Task($data); 
  67. } else { 
  68. return $data; 
  69. /** 
  70. * Update tasks that are leased out of a TaskQueue. This method supports patch semantics. 
  71. * (tasks.patch) 
  72. * @param string $project The project under which the queue lies. 
  73. * @param string $taskqueue 
  74. * @param string $task 
  75. * @param int $newLeaseSeconds The new lease in seconds. 
  76. * @param Google_Task $postBody 
  77. * @param array $optParams Optional parameters. 
  78. * @return Google_Task 
  79. */ 
  80. public function patch($project, $taskqueue, $task, $newLeaseSeconds, Google_Task $postBody, $optParams = array()) { 
  81. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody); 
  82. $params = array_merge($params, $optParams); 
  83. $data = $this->__call('patch', array($params)); 
  84. if ($this->useObjects()) { 
  85. return new Google_Task($data); 
  86. } else { 
  87. return $data; 
  88. /** 
  89. * Delete a task from a TaskQueue. (tasks.delete) 
  90. * @param string $project The project under which the queue lies. 
  91. * @param string $taskqueue The taskqueue to delete a task from. 
  92. * @param string $task The id of the task to delete. 
  93. * @param array $optParams Optional parameters. 
  94. */ 
  95. public function delete($project, $taskqueue, $task, $optParams = array()) { 
  96. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task); 
  97. $params = array_merge($params, $optParams); 
  98. $data = $this->__call('delete', array($params)); 
  99. return $data; 
  100. /** 
  101. * Lease 1 or more tasks from a TaskQueue. (tasks.lease) 
  102. * @param string $project The project under which the queue lies. 
  103. * @param string $taskqueue The taskqueue to lease a task from. 
  104. * @param int $numTasks The number of tasks to lease. 
  105. * @param int $leaseSecs The lease in seconds. 
  106. * @param array $optParams Optional parameters. 
  107. * @opt_param bool groupByTag When true, all returned tasks will have the same tag 
  108. * @opt_param string tag The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag 
  109. * @return Google_Tasks 
  110. */ 
  111. public function lease($project, $taskqueue, $numTasks, $leaseSecs, $optParams = array()) { 
  112. $params = array('project' => $project, 'taskqueue' => $taskqueue, 'numTasks' => $numTasks, 'leaseSecs' => $leaseSecs); 
  113. $params = array_merge($params, $optParams); 
  114. $data = $this->__call('lease', array($params)); 
  115. if ($this->useObjects()) { 
  116. return new Google_Tasks($data); 
  117. } else { 
  118. return $data; 
/inc/google-api-php-client/src/contrib/Google_TasksService.php  
  1. class Google_TasksServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Creates a new task on the specified task list. (tasks.insert) 
  6. * @param string $tasklist Task list identifier. 
  7. * @param Google_Task $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string parent Parent task identifier. If the task is created at the top level, this parameter is omitted. Optional. 
  10. * @opt_param string previous Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional. 
  11. * @return Google_Task 
  12. */ 
  13. public function insert($tasklist, Google_Task $postBody, $optParams = array()) { 
  14. $params = array('tasklist' => $tasklist, 'postBody' => $postBody); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('insert', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_Task($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Returns the specified task. (tasks.get) 
  23. * @param string $tasklist Task list identifier. 
  24. * @param string $task Task identifier. 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_Task 
  27. */ 
  28. public function get($tasklist, $task, $optParams = array()) { 
  29. $params = array('tasklist' => $tasklist, 'task' => $task); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('get', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_Task($data); 
  34. } else { 
  35. return $data; 
  36. /** 
  37. * Clears all completed tasks from the specified task list. The affected tasks will be marked as 
  38. * 'hidden' and no longer be returned by default when retrieving all tasks for a task list. 
  39. * (tasks.clear) 
  40. * @param string $tasklist Task list identifier. 
  41. * @param array $optParams Optional parameters. 
  42. */ 
  43. public function clear($tasklist, $optParams = array()) { 
  44. $params = array('tasklist' => $tasklist); 
  45. $params = array_merge($params, $optParams); 
  46. $data = $this->__call('clear', array($params)); 
  47. return $data; 
  48. /** 
  49. * Moves the specified task to another position in the task list. This can include putting it as a 
  50. * child task under a new parent and/or move it to a different position among its sibling tasks. 
  51. * (tasks.move) 
  52. * @param string $tasklist Task list identifier. 
  53. * @param string $task Task identifier. 
  54. * @param array $optParams Optional parameters. 
  55. * @opt_param string parent New parent task identifier. If the task is moved to the top level, this parameter is omitted. Optional. 
  56. * @opt_param string previous New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. Optional. 
  57. * @return Google_Task 
  58. */ 
  59. public function move($tasklist, $task, $optParams = array()) { 
  60. $params = array('tasklist' => $tasklist, 'task' => $task); 
  61. $params = array_merge($params, $optParams); 
  62. $data = $this->__call('move', array($params)); 
  63. if ($this->useObjects()) { 
  64. return new Google_Task($data); 
  65. } else { 
  66. return $data; 
  67. /** 
  68. * Returns all tasks in the specified task list. (tasks.list) 
  69. * @param string $tasklist Task list identifier. 
  70. * @param array $optParams Optional parameters. 
  71. * @opt_param string dueMax Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date. 
  72. * @opt_param bool showDeleted Flag indicating whether deleted tasks are returned in the result. Optional. The default is False. 
  73. * @opt_param string updatedMin Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time. 
  74. * @opt_param string completedMin Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date. 
  75. * @opt_param string maxResults Maximum number of task lists returned on one page. Optional. The default is 100. 
  76. * @opt_param bool showCompleted Flag indicating whether completed tasks are returned in the result. Optional. The default is True. 
  77. * @opt_param string pageToken Token specifying the result page to return. Optional. 
  78. * @opt_param string completedMax Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date. 
  79. * @opt_param bool showHidden Flag indicating whether hidden tasks are returned in the result. Optional. The default is False. 
  80. * @opt_param string dueMin Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date. 
  81. * @return Google_Tasks 
  82. */ 
  83. public function listTasks($tasklist, $optParams = array()) { 
  84. $params = array('tasklist' => $tasklist); 
  85. $params = array_merge($params, $optParams); 
  86. $data = $this->__call('list', array($params)); 
  87. if ($this->useObjects()) { 
  88. return new Google_Tasks($data); 
  89. } else { 
  90. return $data; 
  91. /** 
  92. * Updates the specified task. (tasks.update) 
  93. * @param string $tasklist Task list identifier. 
  94. * @param string $task Task identifier. 
  95. * @param Google_Task $postBody 
  96. * @param array $optParams Optional parameters. 
  97. * @return Google_Task 
  98. */ 
  99. public function update($tasklist, $task, Google_Task $postBody, $optParams = array()) { 
  100. $params = array('tasklist' => $tasklist, 'task' => $task, 'postBody' => $postBody); 
  101. $params = array_merge($params, $optParams); 
  102. $data = $this->__call('update', array($params)); 
  103. if ($this->useObjects()) { 
  104. return new Google_Task($data); 
  105. } else { 
  106. return $data; 
  107. /** 
  108. * Updates the specified task. This method supports patch semantics. (tasks.patch) 
  109. * @param string $tasklist Task list identifier. 
  110. * @param string $task Task identifier. 
  111. * @param Google_Task $postBody 
  112. * @param array $optParams Optional parameters. 
  113. * @return Google_Task 
  114. */ 
  115. public function patch($tasklist, $task, Google_Task $postBody, $optParams = array()) { 
  116. $params = array('tasklist' => $tasklist, 'task' => $task, 'postBody' => $postBody); 
  117. $params = array_merge($params, $optParams); 
  118. $data = $this->__call('patch', array($params)); 
  119. if ($this->useObjects()) { 
  120. return new Google_Task($data); 
  121. } else { 
  122. return $data; 
  123. /** 
  124. * Deletes the specified task from the task list. (tasks.delete) 
  125. * @param string $tasklist Task list identifier. 
  126. * @param string $task Task identifier. 
  127. * @param array $optParams Optional parameters. 
  128. */ 
  129. public function delete($tasklist, $task, $optParams = array()) { 
  130. $params = array('tasklist' => $tasklist, 'task' => $task); 
  131. $params = array_merge($params, $optParams); 
  132. $data = $this->__call('delete', array($params)); 
  133. return $data;