Package com.bandwidth.webrtc.controllers
Class APIController
java.lang.Object
com.bandwidth.controllers.BaseController
com.bandwidth.webrtc.controllers.APIController
public final class APIController extends BaseController
This class lists all the endpoints of the groups.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.bandwidth.controllers.BaseController
BaseController.RequestExecutor, BaseController.RequestSupplier, BaseController.ResponseHandler<T>
-
Field Summary
Fields inherited from class com.bandwidth.controllers.BaseController
authManagers, config, httpCallback, userAgent
-
Constructor Summary
Constructors Constructor Description APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers)
Initializes the controller.APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers, HttpCallback httpCallback)
Initializes the controller with HTTPCallback. -
Method Summary
Modifier and Type Method Description ApiResponse<java.lang.Void>
addParticipantToSession(java.lang.String accountId, java.lang.String sessionId, java.lang.String participantId, Subscriptions body)
Add a participant to a session Subscriptions can optionally be provided as part of this call.java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
addParticipantToSessionAsync(java.lang.String accountId, java.lang.String sessionId, java.lang.String participantId, Subscriptions body)
Add a participant to a session Subscriptions can optionally be provided as part of this call.ApiResponse<AccountsParticipantsResponse>
createParticipant(java.lang.String accountId, Participant body)
Create a new participant under this account Participants are idempotent, so relevant parameters must be set in this function if desired.java.util.concurrent.CompletableFuture<ApiResponse<AccountsParticipantsResponse>>
createParticipantAsync(java.lang.String accountId, Participant body)
Create a new participant under this account Participants are idempotent, so relevant parameters must be set in this function if desired.ApiResponse<Session>
createSession(java.lang.String accountId, Session body)
Create a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.java.util.concurrent.CompletableFuture<ApiResponse<Session>>
createSessionAsync(java.lang.String accountId, Session body)
Create a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.ApiResponse<java.lang.Void>
deleteParticipant(java.lang.String accountId, java.lang.String participantId)
Delete participant by ID.java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
deleteParticipantAsync(java.lang.String accountId, java.lang.String participantId)
Delete participant by ID.ApiResponse<java.lang.Void>
deleteSession(java.lang.String accountId, java.lang.String sessionId)
Delete session by ID.java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
deleteSessionAsync(java.lang.String accountId, java.lang.String sessionId)
Delete session by ID.ApiResponse<Participant>
getParticipant(java.lang.String accountId, java.lang.String participantId)
Get participant by ID.java.util.concurrent.CompletableFuture<ApiResponse<Participant>>
getParticipantAsync(java.lang.String accountId, java.lang.String participantId)
Get participant by ID.ApiResponse<Subscriptions>
getParticipantSubscriptions(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)
Get a participant's subscriptions.java.util.concurrent.CompletableFuture<ApiResponse<Subscriptions>>
getParticipantSubscriptionsAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)
Get a participant's subscriptions.ApiResponse<Session>
getSession(java.lang.String accountId, java.lang.String sessionId)
Get session by ID.java.util.concurrent.CompletableFuture<ApiResponse<Session>>
getSessionAsync(java.lang.String accountId, java.lang.String sessionId)
Get session by ID.ApiResponse<java.util.List<Participant>>
listSessionParticipants(java.lang.String accountId, java.lang.String sessionId)
List participants in a session.java.util.concurrent.CompletableFuture<ApiResponse<java.util.List<Participant>>>
listSessionParticipantsAsync(java.lang.String accountId, java.lang.String sessionId)
List participants in a session.ApiResponse<java.lang.Void>
removeParticipantFromSession(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
removeParticipantFromSessionAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.ApiResponse<java.lang.Void>
updateParticipantSubscriptions(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId, Subscriptions body)
Update a participant's subscriptions This is a full update that will replace the participant's subscriptions.java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
updateParticipantSubscriptionsAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId, Subscriptions body)
Update a participant's subscriptions This is a full update that will replace the participant's subscriptions.Methods inherited from class com.bandwidth.controllers.BaseController
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponse
-
Constructor Details
-
APIController
public APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers)Initializes the controller.- Parameters:
config
- Configurations added in client.httpClient
- Send HTTP requests and read the responses.authManagers
- Apply authorization to requests.
-
APIController
public APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers, HttpCallback httpCallback)Initializes the controller with HTTPCallback.- Parameters:
config
- Configurations added in client.httpClient
- Send HTTP requests and read the responses.authManagers
- Apply authorization to requests.httpCallback
- Callback to be called before and after the HTTP call.
-
-
Method Details
-
createParticipant
public ApiResponse<AccountsParticipantsResponse> createParticipant(java.lang.String accountId, Participant body) throws ApiException, java.io.IOExceptionCreate a new participant under this account Participants are idempotent, so relevant parameters must be set in this function if desired.- Parameters:
accountId
- Required parameter: Account IDbody
- Optional parameter: Participant parameters- Returns:
- Returns the AccountsParticipantsResponse wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
createParticipantAsync
public java.util.concurrent.CompletableFuture<ApiResponse<AccountsParticipantsResponse>> createParticipantAsync(java.lang.String accountId, Participant body)Create a new participant under this account Participants are idempotent, so relevant parameters must be set in this function if desired.- Parameters:
accountId
- Required parameter: Account IDbody
- Optional parameter: Participant parameters- Returns:
- Returns the AccountsParticipantsResponse wrapped in ApiResponse response from the API call
-
getParticipant
public ApiResponse<Participant> getParticipant(java.lang.String accountId, java.lang.String participantId) throws ApiException, java.io.IOExceptionGet participant by ID.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant ID- Returns:
- Returns the Participant wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
getParticipantAsync
public java.util.concurrent.CompletableFuture<ApiResponse<Participant>> getParticipantAsync(java.lang.String accountId, java.lang.String participantId)Get participant by ID.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant ID- Returns:
- Returns the Participant wrapped in ApiResponse response from the API call
-
deleteParticipant
public ApiResponse<java.lang.Void> deleteParticipant(java.lang.String accountId, java.lang.String participantId) throws ApiException, java.io.IOExceptionDelete participant by ID.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Example:- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
deleteParticipantAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> deleteParticipantAsync(java.lang.String accountId, java.lang.String participantId)Delete participant by ID.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Example:- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
createSession
public ApiResponse<Session> createSession(java.lang.String accountId, Session body) throws ApiException, java.io.IOExceptionCreate a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.- Parameters:
accountId
- Required parameter: Account IDbody
- Optional parameter: Session parameters- Returns:
- Returns the Session wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
createSessionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<Session>> createSessionAsync(java.lang.String accountId, Session body)Create a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.- Parameters:
accountId
- Required parameter: Account IDbody
- Optional parameter: Session parameters- Returns:
- Returns the Session wrapped in ApiResponse response from the API call
-
getSession
public ApiResponse<Session> getSession(java.lang.String accountId, java.lang.String sessionId) throws ApiException, java.io.IOExceptionGet session by ID.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Session wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
getSessionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<Session>> getSessionAsync(java.lang.String accountId, java.lang.String sessionId)Get session by ID.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Session wrapped in ApiResponse response from the API call
-
deleteSession
public ApiResponse<java.lang.Void> deleteSession(java.lang.String accountId, java.lang.String sessionId) throws ApiException, java.io.IOExceptionDelete session by ID.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
deleteSessionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> deleteSessionAsync(java.lang.String accountId, java.lang.String sessionId)Delete session by ID.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
listSessionParticipants
public ApiResponse<java.util.List<Participant>> listSessionParticipants(java.lang.String accountId, java.lang.String sessionId) throws ApiException, java.io.IOExceptionList participants in a session.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Returns:
- Returns the List of Participant wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
listSessionParticipantsAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.util.List<Participant>>> listSessionParticipantsAsync(java.lang.String accountId, java.lang.String sessionId)List participants in a session.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Returns:
- Returns the List of Participant wrapped in ApiResponse response from the API call
-
addParticipantToSession
public ApiResponse<java.lang.Void> addParticipantToSession(java.lang.String accountId, java.lang.String sessionId, java.lang.String participantId, Subscriptions body) throws ApiException, java.io.IOExceptionAdd a participant to a session Subscriptions can optionally be provided as part of this call.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant IDbody
- Optional parameter: Subscriptions the participant should be created with- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
addParticipantToSessionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> addParticipantToSessionAsync(java.lang.String accountId, java.lang.String sessionId, java.lang.String participantId, Subscriptions body)Add a participant to a session Subscriptions can optionally be provided as part of this call.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant IDbody
- Optional parameter: Subscriptions the participant should be created with- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
removeParticipantFromSession
public ApiResponse<java.lang.Void> removeParticipantFromSession(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId) throws ApiException, java.io.IOExceptionRemove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session ID- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
removeParticipantFromSessionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> removeParticipantFromSessionAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
getParticipantSubscriptions
public ApiResponse<Subscriptions> getParticipantSubscriptions(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId) throws ApiException, java.io.IOExceptionGet a participant's subscriptions.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Subscriptions wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
getParticipantSubscriptionsAsync
public java.util.concurrent.CompletableFuture<ApiResponse<Subscriptions>> getParticipantSubscriptionsAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId)Get a participant's subscriptions.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session ID- Returns:
- Returns the Subscriptions wrapped in ApiResponse response from the API call
-
updateParticipantSubscriptions
public ApiResponse<java.lang.Void> updateParticipantSubscriptions(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId, Subscriptions body) throws ApiException, java.io.IOExceptionUpdate a participant's subscriptions This is a full update that will replace the participant's subscriptions. First call `getParticipantSubscriptions` if you need the current subscriptions. Call this function with no `Subscriptions` object to remove all subscriptions.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session IDbody
- Optional parameter: Initial state- Throws:
ApiException
- Represents error response from the server.java.io.IOException
- Signals that an I/O exception of some sort has occurred.
-
updateParticipantSubscriptionsAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> updateParticipantSubscriptionsAsync(java.lang.String accountId, java.lang.String participantId, java.lang.String sessionId, Subscriptions body)Update a participant's subscriptions This is a full update that will replace the participant's subscriptions. First call `getParticipantSubscriptions` if you need the current subscriptions. Call this function with no `Subscriptions` object to remove all subscriptions.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Participant IDsessionId
- Required parameter: Session IDbody
- Optional parameter: Initial state- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-