RestAttachments Class

  • java.lang.Object
    • com.microsoft.bot.connector.rest.RestAttachments

Implements

public class RestAttachments
implements Attachments

An instance of this class provides access to all the operations defined in Attachments.

Method Summary

Modifier and Type Method and Description
java.util.concurrent.CompletableFuture<java.io.InputStream> getAttachment(String attachmentId, String viewId)

GetAttachment.

java.util.concurrent.CompletableFuture<AttachmentInfo> getAttachmentInfo(String attachmentId)

GetAttachmentInfo.

java.lang.String getAttachmentUri(String attachmentId, String viewId)

Get the URI of an attachment view.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

getAttachment

public CompletableFuture getAttachment(String attachmentId, String viewId)

GetAttachment. Get the named view as binary content.

Parameters:

attachmentId - attachment id
viewId - View id from attachmentInfo

Returns:

the observable to the InputStream object

getAttachmentInfo

public CompletableFuture getAttachmentInfo(String attachmentId)

GetAttachmentInfo. Get AttachmentInfo structure describing the attachment views.

Parameters:

attachmentId - attachment id

Returns:

the observable to the AttachmentInfo object

getAttachmentUri

public String getAttachmentUri(String attachmentId, String viewId)

Get the URI of an attachment view.

Parameters:

attachmentId - id of the attachment.
viewId - default is "original".

Returns:

URI of the attachment.

Applies to