Skip to content

Commit d5655e7

Browse files
feat(chat): update the api
#### chat:v1 The following keys were added: - resources.media.methods.upload (Total Keys: 19) - resources.spaces.methods.create (Total Keys: 10) - resources.spaces.methods.delete (Total Keys: 11) - resources.spaces.methods.findDirectMessage (Total Keys: 9) - resources.spaces.methods.list.parameters.filter (Total Keys: 2) - resources.spaces.methods.patch (Total Keys: 15) - resources.spaces.methods.setup (Total Keys: 8) - resources.spaces.resources.members.methods.create (Total Keys: 12) - resources.spaces.resources.members.methods.delete (Total Keys: 11) - resources.spaces.resources.members.methods.list.parameters.filter (Total Keys: 2) - resources.spaces.resources.members.methods.list.parameters.showInvited (Total Keys: 2) - resources.spaces.resources.messages.methods.create.parameters.threadKey.deprecated (Total Keys: 1) - resources.spaces.resources.messages.methods.delete.parameters.force (Total Keys: 2) - resources.spaces.resources.messages.methods.list (Total Keys: 22) - resources.spaces.resources.messages.resources.reactions.methods.create (Total Keys: 12) - resources.spaces.resources.messages.resources.reactions.methods.delete (Total Keys: 11) - resources.spaces.resources.messages.resources.reactions.methods.list (Total Keys: 18) - schemas.AttachmentDataRef.properties.attachmentUploadToken.type (Total Keys: 1) - schemas.CustomEmoji (Total Keys: 3) - schemas.DeletionMetadata (Total Keys: 3) - schemas.Emoji (Total Keys: 10) - schemas.GoogleAppsCardV1CardFixedFooter.properties.widgets (Total Keys: 2) - schemas.GoogleAppsCardV1Column (Total Keys: 11) - schemas.GoogleAppsCardV1FooterWidget (Total Keys: 7) - schemas.GoogleAppsCardV1Widget.properties.columns.$ref (Total Keys: 1) - schemas.GoogleAppsCardV1Widget.properties.horizontalAlignment.type (Total Keys: 1) - schemas.GoogleAppsCardV1Widgets (Total Keys: 9) - schemas.ListMessagesResponse (Total Keys: 5) - schemas.ListReactionsResponse (Total Keys: 5) - schemas.Message.properties.deleteTime (Total Keys: 3) - schemas.Message.properties.deletionMetadata (Total Keys: 2) - schemas.Message.properties.emojiReactionSummaries (Total Keys: 3) - schemas.Reaction (Total Keys: 6) - schemas.SetUpSpaceRequest (Total Keys: 6) - schemas.Space.properties.spaceHistoryState.type (Total Keys: 1) - schemas.Space.properties.spaceType.type (Total Keys: 1) - schemas.UploadAttachmentRequest (Total Keys: 3) - schemas.UploadAttachmentResponse (Total Keys: 3)
1 parent 542a8d9 commit d5655e7

File tree

7 files changed

+16160
-4445
lines changed

7 files changed

+16160
-4445
lines changed

docs/dyn/chat_v1.media.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ <h2>Instance Methods</h2>
8383
<p class="toc_element">
8484
<code><a href="#download_media">download_media(resourceName, x__xgafv=None)</a></code></p>
8585
<p class="firstline">Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.</p>
86+
<p class="toc_element">
87+
<code><a href="#upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p>
88+
<p class="firstline">[Developer Preview](https://developers.google.com/workspace/preview): Uploads an attachment. Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).</p>
8689
<h3>Method Details</h3>
8790
<div class="method">
8891
<code class="details" id="close">close()</code>
@@ -125,4 +128,35 @@ <h3>Method Details</h3>
125128
</pre>
126129
</div>
127130

131+
<div class="method">
132+
<code class="details" id="upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code>
133+
<pre>[Developer Preview](https://developers.google.com/workspace/preview): Uploads an attachment. Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren&#x27;t supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&amp;co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
134+
135+
Args:
136+
parent: string, Required. Resource name of the Chat space in which the attachment is uploaded. Format &quot;spaces/{space}&quot;. (required)
137+
body: object, The request body.
138+
The object takes the form of:
139+
140+
{ # [Developer Preview](https://developers.google.com/workspace/preview).
141+
&quot;filename&quot;: &quot;A String&quot;, # Required. The filename of the attachment, including the file extension.
142+
}
143+
144+
media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
145+
media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
146+
x__xgafv: string, V1 error format.
147+
Allowed values
148+
1 - v1 error format
149+
2 - v2 error format
150+
151+
Returns:
152+
An object of the form:
153+
154+
{
155+
&quot;attachmentDataRef&quot;: { # Reference to the uploaded attachment.
156+
&quot;attachmentUploadToken&quot;: &quot;A String&quot;, # Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments. [Developer Preview](https://developers.google.com/workspace/preview).
157+
&quot;resourceName&quot;: &quot;A String&quot;, # The resource name of the attachment data. This field is used with the media API to download the attachment data.
158+
},
159+
}</pre>
160+
</div>
161+
128162
</body></html>

docs/dyn/chat_v1.spaces.html

Lines changed: 249 additions & 12 deletions
Large diffs are not rendered by default.

docs/dyn/chat_v1.spaces.members.html

Lines changed: 93 additions & 10 deletions
Large diffs are not rendered by default.

docs/dyn/chat_v1.spaces.messages.attachments.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h3>Method Details</h3>
9191
<pre>Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
9292

9393
Args:
94-
name: string, Required. Resource name of the attachment, in the form &quot;spaces/*/messages/*/attachments/*&quot;. (required)
94+
name: string, Required. Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`. (required)
9595
x__xgafv: string, V1 error format.
9696
Allowed values
9797
1 - v1 error format
@@ -101,18 +101,19 @@ <h3>Method Details</h3>
101101
An object of the form:
102102

103103
{ # An attachment in Google Chat.
104-
&quot;attachmentDataRef&quot;: { # A reference to the attachment data. This is used with the media API to download the attachment data.
105-
&quot;resourceName&quot;: &quot;A String&quot;, # The resource name of the attachment data. This is used with the media API to download the attachment data.
104+
&quot;attachmentDataRef&quot;: { # A reference to the attachment data. This field is used with the media API to download the attachment data.
105+
&quot;attachmentUploadToken&quot;: &quot;A String&quot;, # Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments. [Developer Preview](https://developers.google.com/workspace/preview).
106+
&quot;resourceName&quot;: &quot;A String&quot;, # The resource name of the attachment data. This field is used with the media API to download the attachment data.
106107
},
107108
&quot;contentName&quot;: &quot;A String&quot;, # The original file name for the content, not the full path.
108109
&quot;contentType&quot;: &quot;A String&quot;, # The content type (MIME type) of the file.
109-
&quot;downloadUri&quot;: &quot;A String&quot;, # Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content.
110-
&quot;driveDataRef&quot;: { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API.
111-
&quot;driveFileId&quot;: &quot;A String&quot;, # The id for the drive file, for use with the Drive API.
110+
&quot;downloadUri&quot;: &quot;A String&quot;, # Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn&#x27;t use this URL to download attachment content.
111+
&quot;driveDataRef&quot;: { # A reference to the data of a drive attachment. # A reference to the drive attachment. This field is used with the Drive API.
112+
&quot;driveFileId&quot;: &quot;A String&quot;, # The ID for the drive file. Use with the Drive API.
112113
},
113-
&quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form &quot;spaces/*/messages/*/attachments/*&quot;.
114+
&quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`.
114115
&quot;source&quot;: &quot;A String&quot;, # The source of the attachment.
115-
&quot;thumbnailUri&quot;: &quot;A String&quot;, # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content.
116+
&quot;thumbnailUri&quot;: &quot;A String&quot;, # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn&#x27;t use this URL to download attachment content.
116117
}</pre>
117118
</div>
118119

0 commit comments

Comments
 (0)