Google Chat API . spaces . messages . attachments

Instance Methods

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Gets the metadata of a message attachment. The attachment data is fetched using the media API.

Method Details

close()
Close httplib2 connections.
get(name, x__xgafv=None)
Gets the metadata of a message attachment. The attachment data is fetched using the media API.

Args:
  name: string, Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An attachment in Google Chat.
  "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data.
    "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data.
  },
  "contentName": "A String", # The original file name for the content, not the full path.
  "contentType": "A String", # The content type (MIME type) of the file.
  "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content.
  "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API.
    "driveFileId": "A String", # The id for the drive file, for use with the Drive API.
  },
  "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*".
  "source": "A String", # The source of the attachment.
  "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content.
}