Skip to content

Commit

Permalink
feat(chat): update the API
Browse files Browse the repository at this point in the history
#### chat:v1
The following keys were added:
- resources.spaces.resources.messages.resources.attachments.methods.get.description
- resources.spaces.resources.messages.resources.attachments.methods.get.flatPath
- resources.spaces.resources.messages.resources.attachments.methods.get.httpMethod
- resources.spaces.resources.messages.resources.attachments.methods.get.id
- resources.spaces.resources.messages.resources.attachments.methods.get.parameterOrder
- resources.spaces.resources.messages.resources.attachments.methods.get.parameters.name.description
- resources.spaces.resources.messages.resources.attachments.methods.get.parameters.name.location
- resources.spaces.resources.messages.resources.attachments.methods.get.parameters.name.pattern
- resources.spaces.resources.messages.resources.attachments.methods.get.parameters.name.required
- resources.spaces.resources.messages.resources.attachments.methods.get.parameters.name.type
- resources.spaces.resources.messages.resources.attachments.methods.get.path
- resources.spaces.resources.messages.resources.attachments.methods.get.response.$ref
- schemas.Attachment.description
- schemas.Attachment.id
- schemas.Attachment.properties.attachmentDataRef.$ref
- schemas.Attachment.properties.attachmentDataRef.description
- schemas.Attachment.properties.contentName.description
- schemas.Attachment.properties.contentName.type
- schemas.Attachment.properties.contentType.description
- schemas.Attachment.properties.contentType.type
- schemas.Attachment.properties.downloadUri.description
- schemas.Attachment.properties.downloadUri.type
- schemas.Attachment.properties.driveDataRef.$ref
- schemas.Attachment.properties.driveDataRef.description
- schemas.Attachment.properties.name.description
- schemas.Attachment.properties.name.type
- schemas.Attachment.properties.source.description
- schemas.Attachment.properties.source.enum
- schemas.Attachment.properties.source.enumDescriptions
- schemas.Attachment.properties.source.type
- schemas.Attachment.properties.thumbnailUri.description
- schemas.Attachment.properties.thumbnailUri.type
- schemas.Attachment.type
- schemas.AttachmentDataRef.description
- schemas.AttachmentDataRef.id
- schemas.AttachmentDataRef.properties.resourceName.description
- schemas.AttachmentDataRef.properties.resourceName.type
- schemas.AttachmentDataRef.type
- schemas.DriveDataRef.description
- schemas.DriveDataRef.id
- schemas.DriveDataRef.properties.driveFileId.description
- schemas.DriveDataRef.properties.driveFileId.type
- schemas.DriveDataRef.type
- schemas.Message.properties.attachment.description
- schemas.Message.properties.attachment.items.$ref
- schemas.Message.properties.attachment.type
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jul 15, 2020
1 parent 33a768d commit 9612338
Show file tree
Hide file tree
Showing 2 changed files with 324 additions and 1 deletion.
108 changes: 107 additions & 1 deletion discovery/chat-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,40 @@
"$ref": "Message"
}
}
},
"resources": {
"attachments": {
"methods": {
"get": {
"description": "Gets the metadata of a message attachment. The attachment data is fetched\nusing the media API.",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}",
"httpMethod": "GET",
"id": "chat.spaces.messages.attachments.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Resource name of the attachment, in the form\n\"spaces/*/messages/*/attachments/*\".",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Attachment"
}
}
}
}
}
}
}
}
},
"revision": "20200701",
"revision": "20200708",
"rootUrl": "https://chat.googleapis.com/",
"schemas": {
"ActionParameter": {
Expand Down Expand Up @@ -395,6 +423,66 @@
},
"type": "object"
},
"Attachment": {
"description": "An attachment in Hangouts Chat.",
"id": "Attachment",
"properties": {
"attachmentDataRef": {
"$ref": "AttachmentDataRef",
"description": "A reference to the attachment data. This is used with the media API to\ndownload the attachment data."
},
"contentName": {
"description": "The original file name for the content, not the full path.",
"type": "string"
},
"contentType": {
"description": "The content type (MIME type) of the file.",
"type": "string"
},
"downloadUri": {
"description": "Output only. The download URL which should be used to allow a human user to\ndownload the attachment. Bots should not use this URL to download\nattachment content.",
"type": "string"
},
"driveDataRef": {
"$ref": "DriveDataRef",
"description": "A reference to the drive attachment. This is used with the Drive API."
},
"name": {
"description": "Resource name of the attachment, in the form\n\"spaces/*/messages/*/attachments/*\".",
"type": "string"
},
"source": {
"description": "The source of the attachment.",
"enum": [
"SOURCE_UNSPECIFIED",
"DRIVE_FILE",
"UPLOADED_CONTENT"
],
"enumDescriptions": [
"",
"",
""
],
"type": "string"
},
"thumbnailUri": {
"description": "Output only. The thumbnail URL which should be used to preview the\nattachment to a human user. Bots should not use this URL to download\nattachment content.",
"type": "string"
}
},
"type": "object"
},
"AttachmentDataRef": {
"description": "A reference to the data of an attachment.",
"id": "AttachmentDataRef",
"properties": {
"resourceName": {
"description": "The resource name of the attachment data. This is used with the media API\nto download the attachment data.",
"type": "string"
}
},
"type": "object"
},
"Button": {
"description": "A button. Can be a text button or an image button.",
"id": "Button",
Expand Down Expand Up @@ -544,6 +632,17 @@
},
"type": "object"
},
"DriveDataRef": {
"description": "A reference to the data of a drive attachment.",
"id": "DriveDataRef",
"properties": {
"driveFileId": {
"description": "The id for the drive file, for use with the Drive API.",
"type": "string"
}
},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
"id": "Empty",
Expand Down Expand Up @@ -871,6 +970,13 @@
"description": "Plain-text body of the message with all bot mentions stripped out.",
"type": "string"
},
"attachment": {
"description": "User uploaded attachment.",
"items": {
"$ref": "Attachment"
},
"type": "array"
},
"cards": {
"description": "Rich, formatted and interactive cards that can be used to display UI\nelements such as: formatted texts, buttons, clickable images. Cards are\nnormally displayed below the plain-text body of the message.",
"items": {
Expand Down
Loading

0 comments on commit 9612338

Please # to comment.