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.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)
  • Loading branch information
yoshi-automation committed May 24, 2023
1 parent 542a8d9 commit d5655e7
Show file tree
Hide file tree
Showing 7 changed files with 16,160 additions and 4,445 deletions.
34 changes: 34 additions & 0 deletions docs/dyn/chat_v1.media.html
Expand Up @@ -83,6 +83,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#download_media">download_media(resourceName, x__xgafv=None)</a></code></p>
<p class="firstline">Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.</p>
<p class="toc_element">
<code><a href="#upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p>
<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>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
Expand Down Expand Up @@ -125,4 +128,35 @@ <h3>Method Details</h3>
</pre>
</div>

<div class="method">
<code class="details" id="upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code>
<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).

Args:
parent: string, Required. Resource name of the Chat space in which the attachment is uploaded. Format &quot;spaces/{space}&quot;. (required)
body: object, The request body.
The object takes the form of:

{ # [Developer Preview](https://developers.google.com/workspace/preview).
&quot;filename&quot;: &quot;A String&quot;, # Required. The filename of the attachment, including the file extension.
}

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.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{
&quot;attachmentDataRef&quot;: { # Reference to the uploaded attachment.
&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).
&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.
},
}</pre>
</div>

</body></html>
261 changes: 249 additions & 12 deletions docs/dyn/chat_v1.spaces.html

Large diffs are not rendered by default.

103 changes: 93 additions & 10 deletions docs/dyn/chat_v1.spaces.members.html

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions docs/dyn/chat_v1.spaces.messages.attachments.html
Expand Up @@ -91,7 +91,7 @@ <h3>Method Details</h3>
<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).

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

{ # An attachment in Google Chat.
&quot;attachmentDataRef&quot;: { # A reference to the attachment data. This is used with the media API to download the attachment data.
&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.
&quot;attachmentDataRef&quot;: { # A reference to the attachment data. This field is used with the media API to download the attachment data.
&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).
&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.
},
&quot;contentName&quot;: &quot;A String&quot;, # The original file name for the content, not the full path.
&quot;contentType&quot;: &quot;A String&quot;, # The content type (MIME type) of the file.
&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.
&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.
&quot;driveFileId&quot;: &quot;A String&quot;, # The id for the drive file, for use with the Drive API.
&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.
&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.
&quot;driveFileId&quot;: &quot;A String&quot;, # The ID for the drive file. Use with the Drive API.
},
&quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form &quot;spaces/*/messages/*/attachments/*&quot;.
&quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`.
&quot;source&quot;: &quot;A String&quot;, # The source of the attachment.
&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.
&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.
}</pre>
</div>

Expand Down

0 comments on commit d5655e7

Please sign in to comment.