GetConversationItemsWithConversationId method

Future<ConversationResponse?> GetConversationItemsWithConversationId(
  1. ConversationId conversationId,
  2. PropertySet propertySet,
  3. String? syncState,
  4. Iterable<FolderId>? foldersToIgnore,
  5. ConversationSortOrder? sortOrder,
)
Gets the items for a conversation. The conversation id. The set of properties to load. The optional sync state representing the point in time when to start the synchronization. The folders to ignore. Conversation item sort order.

Implementation

Future<ConversationResponse?> GetConversationItemsWithConversationId(
  ConversationId conversationId,
  PropertySet propertySet,
  String? syncState,
  Iterable<FolderId>? foldersToIgnore,
  ConversationSortOrder? sortOrder,
) async {
  List<ConversationRequest> conversations = <ConversationRequest>[];
  conversations.add(
    ConversationRequest.withConversationIdAndSyncState(
      conversationId,
      syncState,
    ),
  );

  return (await InternalGetConversationItems(
    conversations,
    propertySet,
    foldersToIgnore,
    sortOrder,
    null,
    /* mailboxScope */
    null,
    /* maxItemsToReturn */
    null,
    /* anchorMailbox */
    ServiceErrorHandling.ThrowOnError,
  ))[0].Conversation;
}