Google_TimelineAttachmentsServiceResource
The "attachments" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /google-api/src/contrib/Google_MirrorService.php
- class Google_TimelineAttachmentsServiceResource extends Google_ServiceResource {
- /**
- * Deletes an attachment from a timeline item. (attachments.delete)
- *
- * @param string $itemId The ID of the timeline item the attachment belongs to.
- * @param string $attachmentId The ID of the attachment.
- * @param array $optParams Optional parameters.
- */
- public function delete($itemId, $attachmentId, $optParams = array()) {
- $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Retrieves an attachment on a timeline item by item ID and attachment ID. (attachments.get)
- *
- * @param string $itemId The ID of the timeline item the attachment belongs to.
- * @param string $attachmentId The ID of the attachment.
- * @param array $optParams Optional parameters.
- * @return Google_Attachment
- */
- public function get($itemId, $attachmentId, $optParams = array()) {
- $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Attachment($data);
- } else {
- return $data;
- }
- }
- /**
- * Adds a new attachment to a timeline item. (attachments.insert)
- *
- * @param string $itemId The ID of the timeline item the attachment belongs to.
- * @param array $optParams Optional parameters.
- * @return Google_Attachment
- */
- public function insert($itemId, $optParams = array()) {
- $params = array('itemId' => $itemId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Attachment($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns a list of attachments for a timeline item. (attachments.list)
- *
- * @param string $itemId The ID of the timeline item whose attachments should be listed.
- * @param array $optParams Optional parameters.
- * @return Google_AttachmentsListResponse
- */
- public function listTimelineAttachments($itemId, $optParams = array()) {
- $params = array('itemId' => $itemId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_AttachmentsListResponse($data);
- } else {
- return $data;
- }
- }
- }