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(ApiClient apiClient)
-
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.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 endpoint will delete the indicated webhook.ApiResponse<Void>deleteWithHttpInfo(String webhookId)Delete a Webhook This endpoint will delete the indicated webhook.Webhookget(String webhookId)Show Webhook details This call provides the same JSON information provided on Webjhook creation.ApiClientgetApiClient()ApiResponse<Webhook>getWithHttpInfo(String webhookId)Show Webhook details This call provides the same JSON information provided on Webjhook creation.WebhooksApi.APIlistRequestlist()List all webhooks Requests to this endpoint return 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.
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
delete
public void delete(String webhookId) throws ApiException
Delete a Webhook This endpoint 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 - 404 Not Found -
-
deleteWithHttpInfo
public ApiResponse<Void> deleteWithHttpInfo(String webhookId) throws ApiException
Delete a Webhook This endpoint 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 - 404 Not Found -
-
get
public Webhook get(String webhookId) throws ApiException
Show Webhook details This call provides the same JSON information provided on Webjhook creation.- 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 -
-
getWithHttpInfo
public ApiResponse<Webhook> getWithHttpInfo(String webhookId) throws ApiException
Show Webhook details This call provides the same JSON information provided on Webjhook creation.- 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 -
-
list
public WebhooksApi.APIlistRequest list()
List all webhooks Requests to this endpoint return 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 -
-
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``` When a new video is uploaded into your account, it will be encoded into several different HLS sizes/bitrates. 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 livestream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fores when the livestream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` This event is similar to ```video.encoding.quality.completed```, but tells you if a livestream has been recorded as a VOD.- 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 - 400 Bad Request -
-
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``` When a new video is uploaded into your account, it will be encoded into several different HLS sizes/bitrates. 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 livestream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fores when the livestream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` This event is similar to ```video.encoding.quality.completed```, but tells you if a livestream has been recorded as a VOD.- 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 - 400 Bad Request -
-
-