Google Mirror API . timeline . attachments

Instance Methods

delete(itemId, attachmentId)

Deletes an attachment from a timeline item.

get(itemId, attachmentId)

Retrieves an attachment on a timeline item by item ID and attachment ID.

get_media(itemId, attachmentId)

Retrieves an attachment on a timeline item by item ID and attachment ID.

insert(itemId, media_body=None, media_mime_type=None)

Adds a new attachment to a timeline item.

list(itemId)

Returns a list of attachments for a timeline item.

Method Details

delete(itemId, attachmentId)
Deletes an attachment from a timeline item.

Args:
  itemId: string, The ID of the timeline item the attachment belongs to. (required)
  attachmentId: string, The ID of the attachment. (required)
get(itemId, attachmentId)
Retrieves an attachment on a timeline item by item ID and attachment ID.

Args:
  itemId: string, The ID of the timeline item the attachment belongs to. (required)
  attachmentId: string, The ID of the attachment. (required)

Returns:
  An object of the form:

    { # Represents media content, such as a photo, that can be attached to a timeline item.
    "contentUrl": "A String", # The URL for the content.
    "contentType": "A String", # The MIME type of the attachment.
    "id": "A String", # The ID of the attachment.
    "isProcessingContent": True or False, # Indicates that the contentUrl is not available because the attachment content is still being processed. If the caller wishes to retrieve the content, it should try again later.
  }
get_media(itemId, attachmentId)
Retrieves an attachment on a timeline item by item ID and attachment ID.

Args:
  itemId: string, The ID of the timeline item the attachment belongs to. (required)
  attachmentId: string, The ID of the attachment. (required)

Returns:
  The media object as a string.

    
insert(itemId, media_body=None, media_mime_type=None)
Adds a new attachment to a timeline item.

Args:
  itemId: string, The ID of the timeline item the attachment belongs to. (required)
  media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
  media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.

Returns:
  An object of the form:

    { # Represents media content, such as a photo, that can be attached to a timeline item.
    "contentUrl": "A String", # The URL for the content.
    "contentType": "A String", # The MIME type of the attachment.
    "id": "A String", # The ID of the attachment.
    "isProcessingContent": True or False, # Indicates that the contentUrl is not available because the attachment content is still being processed. If the caller wishes to retrieve the content, it should try again later.
  }
list(itemId)
Returns a list of attachments for a timeline item.

Args:
  itemId: string, The ID of the timeline item whose attachments should be listed. (required)

Returns:
  An object of the form:

    { # A list of Attachments. This is the response from the server to GET requests on the attachments collection.
    "items": [ # The list of attachments.
      { # Represents media content, such as a photo, that can be attached to a timeline item.
        "contentUrl": "A String", # The URL for the content.
        "contentType": "A String", # The MIME type of the attachment.
        "id": "A String", # The ID of the attachment.
        "isProcessingContent": True or False, # Indicates that the contentUrl is not available because the attachment content is still being processed. If the caller wishes to retrieve the content, it should try again later.
      },
    ],
    "kind": "mirror#attachmentsList", # The type of resource. This is always mirror#attachmentsList.
  }