Language

WebPubSubChatServiceClient.GetMessagesAsync Method

Definition

Overloads

Name Description
GetMessagesAsync(String, MessageQueryOptions, CancellationToken)

Query messages in a conversation from latest to earliest.

GetMessagesAsync(String, String, String, Nullable<Int32>, RequestContext)

[Protocol Method] Query messages in a conversation from latest to earliest.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

GetMessagesAsync(String, MessageQueryOptions, CancellationToken)

Source:
WebPubSubChatServiceClient.cs

Query messages in a conversation from latest to earliest.

public virtual Azure.AsyncPageable<Azure.Messaging.WebPubSub.Chat.WebPubSubChatMessage> GetMessagesAsync(string conversationId, Azure.Messaging.WebPubSub.Chat.MessageQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessagesAsync : string * Azure.Messaging.WebPubSub.Chat.MessageQueryOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Messaging.WebPubSub.Chat.WebPubSubChatMessage>
override this.GetMessagesAsync : string * Azure.Messaging.WebPubSub.Chat.MessageQueryOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Messaging.WebPubSub.Chat.WebPubSubChatMessage>
Public Overridable Function GetMessagesAsync (conversationId As String, Optional options As MessageQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of WebPubSubChatMessage)

Parameters

conversationId
String

Conversation identifier.

options
MessageQueryOptions

Options for querying messages.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

conversationId is null.

conversationId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetMessagesAsync(String, String, String, Nullable<Int32>, RequestContext)

Source:
WebPubSubChatServiceClient.cs

[Protocol Method] Query messages in a conversation from latest to earliest.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetMessagesAsync(string conversationId, string latestMessageId, string earliestMessageId, int? maxPageSize, Azure.RequestContext context);
abstract member GetMessagesAsync : string * string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetMessagesAsync : string * string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetMessagesAsync (conversationId As String, latestMessageId As String, earliestMessageId As String, maxPageSize As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)

Parameters

conversationId
String

Conversation identifier.

latestMessageId
String

Latest message ID (exclusive) for pagination.

earliestMessageId
String

Earliest message ID (exclusive) for pagination.

maxPageSize
Nullable<Int32>

The maximum number of result items per page.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

conversationId is null.

conversationId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to