target.apidocs.com.google.api.services.chat.v1.HangoutsChat.Media.html Maven / Gradle / Ivy
HangoutsChat.Media (Google Chat API v1-rev20240829-2.0.0)
com.google.api.services.chat.v1
Class HangoutsChat.Media
- java.lang.Object
-
- com.google.api.services.chat.v1.HangoutsChat.Media
-
- Enclosing class:
- HangoutsChat
public class HangoutsChat.Media
extends Object
The "media" collection of methods.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
HangoutsChat.Media.Download
class
HangoutsChat.Media.Upload
-
Constructor Summary
Constructors
Constructor and Description
Media()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
HangoutsChat.Media.Download
download(String resourceName)
Downloads media.
HangoutsChat.Media.Upload
upload(String parent,
UploadAttachmentRequest content)
Uploads an attachment.
HangoutsChat.Media.Upload
upload(String parent,
UploadAttachmentRequest content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Uploads an attachment.
-
-
Method Detail
-
download
public HangoutsChat.Media.Download download(String resourceName)
throws IOException
Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.
Create a request for the method "media.download".
This request holds the parameters needed by the chat server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
resourceName
- Name of the media that is being downloaded. See ReadRequest.resource_name.
- Returns:
- the request
- Throws:
IOException
-
upload
public HangoutsChat.Media.Upload upload(String parent,
UploadAttachmentRequest content)
throws IOException
Uploads an attachment. For an example, see [Upload media as a file
attachment](https://developers.google.com/workspace/chat/upload-media-attachments). Requires user
[authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
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.Plat
form%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
Create a request for the method "media.upload".
This request holds the parameters needed by the chat server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
parent
- Required. Resource name of the Chat space in which the attachment is uploaded. Format
"spaces/{space}".
content
- the UploadAttachmentRequest
- Returns:
- the request
- Throws:
IOException
-
upload
public HangoutsChat.Media.Upload upload(String parent,
UploadAttachmentRequest content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
throws IOException
Uploads an attachment. For an example, see [Upload media as a file
attachment](https://developers.google.com/workspace/chat/upload-media-attachments). Requires user
[authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
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.Plat
form%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
Create a request for the method "media.upload".
This request holds the parameters needed by the the chat server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
- Parameters:
parent
- Required. Resource name of the Chat space in which the attachment is uploaded. Format
"spaces/{space}".
content
- the UploadAttachmentRequest
media metadata or null
if none
mediaContent
- The media HTTP content.
- Returns:
- the request
- Throws:
IOException
- if the initialization of the request fails
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy