Class ParticipantsApi


  • public class ParticipantsApi
    extends java.lang.Object
    • Constructor Detail

      • ParticipantsApi

        public ParticipantsApi()
      • ParticipantsApi

        public ParticipantsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • joinConversation

        public ParticipantResponse joinConversation​(ParticipantJoinBody participantJoinBody,
                                                    java.lang.String appId,
                                                    java.lang.String conversationId)
                                             throws ApiException
        Join Conversation Adds a user to a conversation using either their userId or userExternalId. The endpoint only supports adding a participant to a sdkGroup conversation.
        Parameters:
        participantJoinBody - (required)
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        Returns:
        a ParticipantResponse
        Throws:
        ApiException - if fails to make API call
      • leaveConversation

        public java.lang.Object leaveConversation​(ParticipantLeaveBody participantLeaveBody,
                                                  java.lang.String appId,
                                                  java.lang.String conversationId)
                                           throws ApiException
        Leave Conversation Removes a user from a conversation using either their userId, userExternalId, or participantId.
        Parameters:
        participantLeaveBody - (required)
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        Returns:
        a Object
        Throws:
        ApiException - if fails to make API call
      • listParticipants

        public ParticipantListResponse listParticipants​(java.lang.String appId,
                                                        java.lang.String conversationId,
                                                        Page page)
                                                 throws ApiException
        List Participants Lists all the participants of a particular conversation. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/conversations/:conversationId/participants?page[before]=26508c10541a4b0ff472e5e2 ```
        Parameters:
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        page - Contains parameters for applying cursor pagination. (optional)
        Returns:
        a ParticipantListResponse
        Throws:
        ApiException - if fails to make API call
      • joinConversation

        public ParticipantResponse joinConversation​(java.lang.String bearerToken,
                                                    ParticipantJoinBody participantJoinBody,
                                                    java.lang.String appId,
                                                    java.lang.String conversationId)
                                             throws ApiException
        Join Conversation Adds a user to a conversation using either their userId or userExternalId. The endpoint only supports adding a participant to a sdkGroup conversation.
        Parameters:
        bearerToken - a token to be used for this request (required)
        participantJoinBody - (required)
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        Returns:
        a ParticipantResponse
        Throws:
        ApiException - if fails to make API call
      • leaveConversation

        public java.lang.Object leaveConversation​(java.lang.String bearerToken,
                                                  ParticipantLeaveBody participantLeaveBody,
                                                  java.lang.String appId,
                                                  java.lang.String conversationId)
                                           throws ApiException
        Leave Conversation Removes a user from a conversation using either their userId, userExternalId, or participantId.
        Parameters:
        bearerToken - a token to be used for this request (required)
        participantLeaveBody - (required)
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        Returns:
        a Object
        Throws:
        ApiException - if fails to make API call
      • listParticipants

        public ParticipantListResponse listParticipants​(java.lang.String bearerToken,
                                                        java.lang.String appId,
                                                        java.lang.String conversationId,
                                                        Page page)
                                                 throws ApiException
        List Participants Lists all the participants of a particular conversation. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/conversations/:conversationId/participants?page[before]=26508c10541a4b0ff472e5e2 ```
        Parameters:
        bearerToken - a token to be used for this request (required)
        appId - Identifies the app. (required)
        conversationId - Identifies the conversation. (required)
        page - Contains parameters for applying cursor pagination. (optional)
        Returns:
        a ParticipantListResponse
        Throws:
        ApiException - if fails to make API call