Google_TimelineServiceResource
The "timeline" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /google-api/src/contrib/Google_MirrorService.php
- class Google_TimelineServiceResource extends Google_ServiceResource {
- /**
- * Deletes a timeline item. (timeline.delete)
- *
- * @param string $id The ID of the timeline item.
- * @param array $optParams Optional parameters.
- */
- public function delete($id, $optParams = array()) {
- $params = array('id' => $id);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Gets a single timeline item by ID. (timeline.get)
- *
- * @param string $id The ID of the timeline item.
- * @param array $optParams Optional parameters.
- * @return Google_TimelineItem
- */
- public function get($id, $optParams = array()) {
- $params = array('id' => $id);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_TimelineItem($data);
- } else {
- return $data;
- }
- }
- /**
- * Inserts a new item into the timeline. (timeline.insert)
- *
- * @param Google_TimelineItem $postBody
- * @param array $optParams Optional parameters.
- * @return Google_TimelineItem
- */
- public function insert(Google_TimelineItem $postBody, $optParams = array()) {
- $params = array('postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_TimelineItem($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves a list of timeline items for the authenticated user. (timeline.list)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param string orderBy Controls the order in which timeline items are returned.
- * @opt_param bool includeDeleted If true, tombstone records for deleted items will be returned.
- * @opt_param string maxResults The maximum number of items to include in the response, used for paging.
- * @opt_param string pageToken Token for the page of results to return.
- * @opt_param string sourceItemId If provided, only items with the given sourceItemId will be returned.
- * @opt_param bool pinnedOnly If true, only pinned items will be returned.
- * @opt_param string bundleId If provided, only items with the given bundleId will be returned.
- * @return Google_TimelineListResponse
- */
- public function listTimeline($optParams = array()) {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_TimelineListResponse($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates a timeline item in place. This method supports patch semantics. (timeline.patch)
- *
- * @param string $id The ID of the timeline item.
- * @param Google_TimelineItem $postBody
- * @param array $optParams Optional parameters.
- * @return Google_TimelineItem
- */
- public function patch($id, Google_TimelineItem $postBody, $optParams = array()) {
- $params = array('id' => $id, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_TimelineItem($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates a timeline item in place. (timeline.update)
- *
- * @param string $id The ID of the timeline item.
- * @param Google_TimelineItem $postBody
- * @param array $optParams Optional parameters.
- * @return Google_TimelineItem
- */
- public function update($id, Google_TimelineItem $postBody, $optParams = array()) {
- $params = array('id' => $id, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_TimelineItem($data);
- } else {
- return $data;
- }
- }
- }