Skip to content

Commit

Permalink
Merge pull request #176 from HubSpot/get-user-conversations-paginated
Browse files Browse the repository at this point in the history
Add method to get paginated user.conversations
  • Loading branch information
zmarushchak-hs authored Jun 24, 2020
2 parents c5b3462 + 2e4c7ff commit de5bec6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public interface SlackClient extends Closeable {
Iterable<CompletableFuture<Result<List<Conversation>, SlackError>>> listConversations(ConversationsListParams params);
CompletableFuture<Result<ConversationListResponse, SlackError>> listConversationsPaginated(ConversationsListParams params);
Iterable<CompletableFuture<Result<List<Conversation>, SlackError>>> usersConversations(ConversationsUserParams params);
CompletableFuture<Result<ConversationListResponse, SlackError>> usersConversationsPaginated(ConversationsUserParams params);
CompletableFuture<Result<ConversationsCreateResponse, SlackError>> createConversation(ConversationCreateParams params);
CompletableFuture<Result<ConversationsInviteResponse, SlackError>> inviteToConversation(ConversationInviteParams params);
CompletableFuture<Result<ConversationsUnarchiveResponse, SlackError>> unarchiveConversation(ConversationUnarchiveParams params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,13 @@ protected LazyLoadingPage<Result<List<Conversation>, SlackError>, String> getPag
};
}

@Override
public CompletableFuture<Result<ConversationListResponse, SlackError>> usersConversationsPaginated(
ConversationsUserParams params
) {
return postSlackCommand(SlackMethods.users_conversations, params, ConversationListResponse.class);
}

@Override
public CompletableFuture<Result<ConversationsCreateResponse, SlackError>> createConversation(
ConversationCreateParams params
Expand Down

0 comments on commit de5bec6

Please sign in to comment.