Class AttachmentsApi
- java.lang.Object
-
- com.zendesk.sunshine_conversations_client.api.AttachmentsApi
-
public class AttachmentsApi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AttachmentsApi()AttachmentsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectdeleteAttachment(AttachmentDeleteBody attachmentDeleteBody, java.lang.String appId)Delete Attachment Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API.java.lang.ObjectdeleteAttachment(java.lang.String bearerToken, AttachmentDeleteBody attachmentDeleteBody, java.lang.String appId)Delete Attachment Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API.ApiClientgetApiClient()voidsetApiClient(ApiClient apiClient)AttachmentResponseuploadAttachment(java.io.File source, java.lang.String appId, java.lang.String access, java.lang.String _for, java.lang.String conversationId)Upload Attachment Upload an attachment to Sunshine Conversations to use in future messages.AttachmentResponseuploadAttachment(java.lang.String bearerToken, java.io.File source, java.lang.String appId, java.lang.String access, java.lang.String _for, java.lang.String conversationId)Upload Attachment Upload an attachment to Sunshine Conversations to use in future messages.
-
-
-
Constructor Detail
-
AttachmentsApi
public AttachmentsApi()
-
AttachmentsApi
public AttachmentsApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
deleteAttachment
public java.lang.Object deleteAttachment(AttachmentDeleteBody attachmentDeleteBody, java.lang.String appId) throws ApiException
Delete Attachment Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API. See [Attachments for Messages](#section/Attachments-for-Messages) to have attachments automatically deleted when deleting messages, conversations or users. <aside class=\"notice\">Note that deleted attachments can remain available on our CDN’s cache up to 15 minutes after the delete call.</aside>- Parameters:
attachmentDeleteBody- (required)appId- Identifies the app. (required)- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
uploadAttachment
public AttachmentResponse uploadAttachment(java.io.File source, java.lang.String appId, java.lang.String access, java.lang.String _for, java.lang.String conversationId) throws ApiException
Upload Attachment Upload an attachment to Sunshine Conversations to use in future messages. Files are uploaded using the multipart/form-data content type. Use the returned mediaUrl to send a file, image or carousel message. <aside class=\"notice\">Note that Sunshine Conversations limits the size and type of file you can upload to the platform. See the <a href=\"https://docs.smooch.io/guide/validating-files\">file validation</a> guide for more details.</aside>- Parameters:
source- (required)appId- Identifies the app. (required)access- The access level for the attachment. Currently the only available access level is public. Private is not supported. (required)_for- Specifies the intended container for the attachment, to enable automatic attachment deletion (on deletion of associated message, conversation or user). For now, only message is supported. See [Attachments for Messages](#section/Attachments-for-Messages) for details. (optional)conversationId- Links the attachment getting uploaded to the conversation ID. (optional)- Returns:
- a
AttachmentResponse - Throws:
ApiException- if fails to make API call
-
deleteAttachment
public java.lang.Object deleteAttachment(java.lang.String bearerToken, AttachmentDeleteBody attachmentDeleteBody, java.lang.String appId) throws ApiExceptionDelete Attachment Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API. See [Attachments for Messages](#section/Attachments-for-Messages) to have attachments automatically deleted when deleting messages, conversations or users. <aside class=\"notice\">Note that deleted attachments can remain available on our CDN’s cache up to 15 minutes after the delete call.</aside>- Parameters:
bearerToken- a token to be used for this request (required)attachmentDeleteBody- (required)appId- Identifies the app. (required)- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
uploadAttachment
public AttachmentResponse uploadAttachment(java.lang.String bearerToken, java.io.File source, java.lang.String appId, java.lang.String access, java.lang.String _for, java.lang.String conversationId) throws ApiException
Upload Attachment Upload an attachment to Sunshine Conversations to use in future messages. Files are uploaded using the multipart/form-data content type. Use the returned mediaUrl to send a file, image or carousel message. <aside class=\"notice\">Note that Sunshine Conversations limits the size and type of file you can upload to the platform. See the <a href=\"https://docs.smooch.io/guide/validating-files\">file validation</a> guide for more details.</aside>- Parameters:
bearerToken- a token to be used for this request (required)source- (required)appId- Identifies the app. (required)access- The access level for the attachment. Currently the only available access level is public. Private is not supported. (required)_for- Specifies the intended container for the attachment, to enable automatic attachment deletion (on deletion of associated message, conversation or user). For now, only message is supported. See [Attachments for Messages](#section/Attachments-for-Messages) for details. (optional)conversationId- Links the attachment getting uploaded to the conversation ID. (optional)- Returns:
- a
AttachmentResponse - Throws:
ApiException- if fails to make API call
-
-