Package video.api.client.api.clients
Class WebhooksApi
- java.lang.Object
-
- video.api.client.api.clients.WebhooksApi
-
public class WebhooksApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classWebhooksApi.APIlistRequest
-
Constructor Summary
Constructors Constructor Description WebhooksApi()Constructor for WebhooksApi production environment where API key is not required.WebhooksApi(String basePath)Constructor for WebhooksApi with custom API base path where API key is not required.WebhooksApi(String apiKey, String basePath)Constructor for WebhooksApi with custom API base pathWebhooksApi(String apiKey, Environment environment)Constructor for WebhooksApi with custom API base pathWebhooksApi(ApiClient apiClient)WebhooksApi(Environment environment)Constructor for WebhooksApi with custom API base path where API key is not required.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Webhookcreate(WebhooksCreationPayload webhooksCreationPayload)Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes.okhttp3.CallcreateAsync(WebhooksCreationPayload webhooksCreationPayload, ApiCallback<Webhook> _callback)Create Webhook (asynchronously) Webhooks can push notifications to your server, rather than polling api.video for changes.ApiResponse<Webhook>createWithHttpInfo(WebhooksCreationPayload webhooksCreationPayload)Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes.voiddelete(String webhookId)Delete a Webhook This method will delete the indicated webhook.okhttp3.CalldeleteAsync(String webhookId, ApiCallback<Void> _callback)Delete a Webhook (asynchronously) This method will delete the indicated webhook.ApiResponse<Void>deleteWithHttpInfo(String webhookId)Delete a Webhook This method will delete the indicated webhook.Webhookget(String webhookId)Retrieve Webhook details Retrieve webhook details by id.ApiClientgetApiClient()okhttp3.CallgetAsync(String webhookId, ApiCallback<Webhook> _callback)Retrieve Webhook details (asynchronously) Retrieve webhook details by id.ApiResponse<Webhook>getWithHttpInfo(String webhookId)Retrieve Webhook details Retrieve webhook details by id.WebhooksApi.APIlistRequestlist()List all webhooks Thie method returns a list of your webhooks (with all their details).voidsetApiClient(ApiClient apiClient)
-
-
-
Constructor Detail
-
WebhooksApi
public WebhooksApi(ApiClient apiClient)
-
WebhooksApi
public WebhooksApi()
Constructor for WebhooksApi production environment where API key is not required.
-
WebhooksApi
public WebhooksApi(String basePath)
Constructor for WebhooksApi with custom API base path where API key is not required.- Parameters:
basePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
WebhooksApi
public WebhooksApi(Environment environment)
Constructor for WebhooksApi with custom API base path where API key is not required.- Parameters:
environment- the target environment. Expected Environment.PRODUCTION (default) or Environment.SANDBOX.
-
WebhooksApi
public WebhooksApi(String apiKey, String basePath)
Constructor for WebhooksApi with custom API base path- Parameters:
apiKey- the api key to use to authenticate to the APIbasePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
WebhooksApi
public WebhooksApi(String apiKey, Environment environment)
Constructor for WebhooksApi with custom API base path- Parameters:
apiKey- the api key to use to authenticate to the APIenvironment- the target environment. Expected Environment.PRODUCTION (default) or Environment.SANDBOX.
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
create
public Webhook create(WebhooksCreationPayload webhooksCreationPayload) throws ApiException
Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ \"type\": \"video.encoding.quality.completed\", \"emittedAt\": \"2021-01-29T16:46:25.217+01:00\", \"videoId\": \"viXXXXXXXX\", \"encoding\": \"hls\", \"quality\": \"720p\"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when a live stream has finished broadcasting. * ```video.source.recorded``` This event occurs when a live stream is recorded and submitted for encoding.- Parameters:
webhooksCreationPayload- (required)- Returns:
- Webhook
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
400 Bad Request * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
createWithHttpInfo
public ApiResponse<Webhook> createWithHttpInfo(WebhooksCreationPayload webhooksCreationPayload) throws ApiException
Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ \"type\": \"video.encoding.quality.completed\", \"emittedAt\": \"2021-01-29T16:46:25.217+01:00\", \"videoId\": \"viXXXXXXXX\", \"encoding\": \"hls\", \"quality\": \"720p\"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when a live stream has finished broadcasting. * ```video.source.recorded``` This event occurs when a live stream is recorded and submitted for encoding.- Parameters:
webhooksCreationPayload- (required)- Returns:
- ApiResponse<Webhook>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
400 Bad Request * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
createAsync
public okhttp3.Call createAsync(WebhooksCreationPayload webhooksCreationPayload, ApiCallback<Webhook> _callback) throws ApiException
Create Webhook (asynchronously) Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ \"type\": \"video.encoding.quality.completed\", \"emittedAt\": \"2021-01-29T16:46:25.217+01:00\", \"videoId\": \"viXXXXXXXX\", \"encoding\": \"hls\", \"quality\": \"720p\"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when a live stream has finished broadcasting. * ```video.source.recorded``` This event occurs when a live stream is recorded and submitted for encoding.- Parameters:
webhooksCreationPayload- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 201 Created * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
400 Bad Request * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
get
public Webhook get(String webhookId) throws ApiException
Retrieve Webhook details Retrieve webhook details by id.- Parameters:
webhookId- The unique webhook you wish to retreive details on. (required)- Returns:
- Webhook
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
getWithHttpInfo
public ApiResponse<Webhook> getWithHttpInfo(String webhookId) throws ApiException
Retrieve Webhook details Retrieve webhook details by id.- Parameters:
webhookId- The unique webhook you wish to retreive details on. (required)- Returns:
- ApiResponse<Webhook>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
getAsync
public okhttp3.Call getAsync(String webhookId, ApiCallback<Webhook> _callback) throws ApiException
Retrieve Webhook details (asynchronously) Retrieve webhook details by id.- Parameters:
webhookId- The unique webhook you wish to retreive details on. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
delete
public void delete(String webhookId) throws ApiException
Delete a Webhook This method will delete the indicated webhook.- Parameters:
webhookId- The webhook you wish to delete. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
404 Not Found * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
deleteWithHttpInfo
public ApiResponse<Void> deleteWithHttpInfo(String webhookId) throws ApiException
Delete a Webhook This method will delete the indicated webhook.- Parameters:
webhookId- The webhook you wish to delete. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
404 Not Found * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
deleteAsync
public okhttp3.Call deleteAsync(String webhookId, ApiCallback<Void> _callback) throws ApiException
Delete a Webhook (asynchronously) This method will delete the indicated webhook.- Parameters:
webhookId- The webhook you wish to delete. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 204 No Content * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
404 Not Found * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
list
public WebhooksApi.APIlistRequest list()
List all webhooks Thie method returns a list of your webhooks (with all their details). You can filter what the webhook list that the API returns using the parameters described below.- Returns:
- APIlistRequest
- Http Response Details:
Status Code Description Response Headers 200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
-
-