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, Map<String,AuthManager> authManagers)
Initializes the controller.APIController(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiResponse<Void>
addParticipantToSession(String accountId, String sessionId, String participantId, Subscriptions body)
Add a participant to a session Subscriptions can optionally be provided as part of this call.CompletableFuture<ApiResponse<Void>>
addParticipantToSessionAsync(String accountId, String sessionId, String participantId, Subscriptions body)
Add a participant to a session Subscriptions can optionally be provided as part of this call.ApiResponse<AccountsParticipantsResponse>
createParticipant(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.CompletableFuture<ApiResponse<AccountsParticipantsResponse>>
createParticipantAsync(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(String accountId, Session body)
Create a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.CompletableFuture<ApiResponse<Session>>
createSessionAsync(String accountId, Session body)
Create a new session Sessions are idempotent, so relevant parameters must be set in this function if desired.ApiResponse<Void>
deleteParticipant(String accountId, String participantId)
Delete participant by ID.CompletableFuture<ApiResponse<Void>>
deleteParticipantAsync(String accountId, String participantId)
Delete participant by ID.ApiResponse<Void>
deleteSession(String accountId, String sessionId)
Delete session by ID.CompletableFuture<ApiResponse<Void>>
deleteSessionAsync(String accountId, String sessionId)
Delete session by ID.ApiResponse<Participant>
getParticipant(String accountId, String participantId)
Get participant by ID.CompletableFuture<ApiResponse<Participant>>
getParticipantAsync(String accountId, String participantId)
Get participant by ID.ApiResponse<Subscriptions>
getParticipantSubscriptions(String accountId, String sessionId, String participantId)
Get a participant's subscriptions.CompletableFuture<ApiResponse<Subscriptions>>
getParticipantSubscriptionsAsync(String accountId, String sessionId, String participantId)
Get a participant's subscriptions.ApiResponse<Session>
getSession(String accountId, String sessionId)
Get session by ID.CompletableFuture<ApiResponse<Session>>
getSessionAsync(String accountId, String sessionId)
Get session by ID.ApiResponse<List<Participant>>
listSessionParticipants(String accountId, String sessionId)
List participants in a session.CompletableFuture<ApiResponse<List<Participant>>>
listSessionParticipantsAsync(String accountId, String sessionId)
List participants in a session.ApiResponse<Void>
removeParticipantFromSession(String accountId, String sessionId, String participantId)
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.CompletableFuture<ApiResponse<Void>>
removeParticipantFromSessionAsync(String accountId, String sessionId, String participantId)
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.ApiResponse<Void>
updateParticipantSubscriptions(String accountId, String sessionId, String participantId, Subscriptions body)
Update a participant's subscriptions This is a full update that will replace the participant's subscriptions.CompletableFuture<ApiResponse<Void>>
updateParticipantSubscriptionsAsync(String accountId, String sessionId, String participantId, 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 Detail
-
APIController
public APIController(Configuration config, HttpClient httpClient, Map<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, Map<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 Detail
-
createParticipant
public ApiResponse<AccountsParticipantsResponse> createParticipant(String accountId, Participant body) throws ApiException, IOException
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
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
createParticipantAsync
public CompletableFuture<ApiResponse<AccountsParticipantsResponse>> createParticipantAsync(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(String accountId, String participantId) throws ApiException, IOException
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
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
getParticipantAsync
public CompletableFuture<ApiResponse<Participant>> getParticipantAsync(String accountId, 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<Void> deleteParticipant(String accountId, String participantId) throws ApiException, IOException
Delete participant by ID.- Parameters:
accountId
- Required parameter: Account IDparticipantId
- Required parameter: Example:- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
deleteParticipantAsync
public CompletableFuture<ApiResponse<Void>> deleteParticipantAsync(String accountId, 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(String accountId, Session body) throws ApiException, IOException
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
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
createSessionAsync
public CompletableFuture<ApiResponse<Session>> createSessionAsync(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(String accountId, String sessionId) throws ApiException, IOException
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
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
getSessionAsync
public CompletableFuture<ApiResponse<Session>> getSessionAsync(String accountId, 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<Void> deleteSession(String accountId, String sessionId) throws ApiException, IOException
Delete session by ID.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session ID- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
deleteSessionAsync
public CompletableFuture<ApiResponse<Void>> deleteSessionAsync(String accountId, 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<List<Participant>> listSessionParticipants(String accountId, String sessionId) throws ApiException, IOException
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
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
listSessionParticipantsAsync
public CompletableFuture<ApiResponse<List<Participant>>> listSessionParticipantsAsync(String accountId, 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<Void> addParticipantToSession(String accountId, String sessionId, String participantId, Subscriptions body) throws ApiException, IOException
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- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
addParticipantToSessionAsync
public CompletableFuture<ApiResponse<Void>> addParticipantToSessionAsync(String accountId, String sessionId, 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<Void> removeParticipantFromSession(String accountId, String sessionId, String participantId) throws ApiException, IOException
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant ID- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
removeParticipantFromSessionAsync
public CompletableFuture<ApiResponse<Void>> removeParticipantFromSessionAsync(String accountId, String sessionId, String participantId)
Remove a participant from a session This will automatically remove any subscriptions the participant has associated with this session.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant ID- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
getParticipantSubscriptions
public ApiResponse<Subscriptions> getParticipantSubscriptions(String accountId, String sessionId, String participantId) throws ApiException, IOException
Get a participant's subscriptions.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant ID- Returns:
- Returns the Subscriptions wrapped in ApiResponse response from the API call
- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
getParticipantSubscriptionsAsync
public CompletableFuture<ApiResponse<Subscriptions>> getParticipantSubscriptionsAsync(String accountId, String sessionId, String participantId)
Get a participant's subscriptions.- Parameters:
accountId
- Required parameter: Account IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant ID- Returns:
- Returns the Subscriptions wrapped in ApiResponse response from the API call
-
updateParticipantSubscriptions
public ApiResponse<Void> updateParticipantSubscriptions(String accountId, String sessionId, String participantId, Subscriptions body) throws ApiException, IOException
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 IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant IDbody
- Optional parameter: Initial state- Throws:
ApiException
- Represents error response from the server.IOException
- Signals that an I/O exception of some sort has occurred.
-
updateParticipantSubscriptionsAsync
public CompletableFuture<ApiResponse<Void>> updateParticipantSubscriptionsAsync(String accountId, String sessionId, String participantId, 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 IDsessionId
- Required parameter: Session IDparticipantId
- Required parameter: Participant IDbody
- Optional parameter: Initial state- Returns:
- Returns the Void wrapped in ApiResponse response from the API call
-
-