Skip to content

Commit

Permalink
Add new webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
szekelyzol authored Nov 13, 2024
1 parent 2ab8ba3 commit 1fb2ef3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0fe2cac0381637a3a558fb49517a143bede9af02a98487c03e3500dd6ce49387
cbf09a69d4926349a265253638aaccf4c4e5adfb703eed5e9075be495543a3ee
2 changes: 1 addition & 1 deletion docs/WebhooksApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Method | HTTP request | Description
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.
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. * `video.caption.generated` This event occurs when an automatic caption has been generated. * `video.summary.generated` This event occurs when an automatic summary has been generated.

### Example
```csharp
Expand Down
2 changes: 1 addition & 1 deletion docs/WebhooksCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Events** | **List<string>** | A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```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``` Occurs when a live stream is recorded and submitted for encoding. |
**Events** | **List<string>** | An array of webhook events that you want to subscribe to. |
**Url** | **string** | The the url to which HTTP notifications are sent. It could be any http or https URL. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
8 changes: 4 additions & 4 deletions src/Api/WebhooksApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public WebhooksApi(ApiClient apiClient)
}

/// <summary>
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;&#x60;&#x60;video.encoding.quality.completed&#x60;&#x60;&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;&#x60;&#x60;live-stream.broadcast.started&#x60;&#x60;&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;&#x60;&#x60;live-stream.broadcast.ended&#x60;&#x60;&#x60; This event fires when a live stream has finished broadcasting. * &#x60;&#x60;&#x60;video.source.recorded&#x60;&#x60;&#x60; This event occurs when a live stream is recorded and submitted for encoding.
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;video.encoding.quality.completed&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;live-stream.broadcast.started&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;live-stream.broadcast.ended&#x60; This event fires when a live stream has finished broadcasting. * &#x60;video.source.recorded&#x60; This event occurs when a live stream is recorded and submitted for encoding. * &#x60;video.caption.generated&#x60; This event occurs when an automatic caption has been generated. * &#x60;video.summary.generated&#x60; This event occurs when an automatic summary has been generated.
/// </summary>
/// <exception cref="ApiVideo.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional)</param>
Expand All @@ -56,7 +56,7 @@ public Task<Webhook> createAsync(WebhooksCreationPayload webhooksCreationPayload
}

/// <summary>
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;&#x60;&#x60;video.encoding.quality.completed&#x60;&#x60;&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;&#x60;&#x60;live-stream.broadcast.started&#x60;&#x60;&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;&#x60;&#x60;live-stream.broadcast.ended&#x60;&#x60;&#x60; This event fires when a live stream has finished broadcasting. * &#x60;&#x60;&#x60;video.source.recorded&#x60;&#x60;&#x60; This event occurs when a live stream is recorded and submitted for encoding.
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;video.encoding.quality.completed&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;live-stream.broadcast.started&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;live-stream.broadcast.ended&#x60; This event fires when a live stream has finished broadcasting. * &#x60;video.source.recorded&#x60; This event occurs when a live stream is recorded and submitted for encoding. * &#x60;video.caption.generated&#x60; This event occurs when an automatic caption has been generated. * &#x60;video.summary.generated&#x60; This event occurs when an automatic summary has been generated.
/// </summary>
/// <exception cref="ApiVideo.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="webhooksCreationPayload"></param>
Expand All @@ -70,7 +70,7 @@ public Webhook create(WebhooksCreationPayload webhooksCreationPayload)


/// <summary>
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;&#x60;&#x60;video.encoding.quality.completed&#x60;&#x60;&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;&#x60;&#x60;live-stream.broadcast.started&#x60;&#x60;&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;&#x60;&#x60;live-stream.broadcast.ended&#x60;&#x60;&#x60; This event fires when a live stream has finished broadcasting. * &#x60;&#x60;&#x60;video.source.recorded&#x60;&#x60;&#x60; This event occurs when a live stream is recorded and submitted for encoding.
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;video.encoding.quality.completed&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;live-stream.broadcast.started&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;live-stream.broadcast.ended&#x60; This event fires when a live stream has finished broadcasting. * &#x60;video.source.recorded&#x60; This event occurs when a live stream is recorded and submitted for encoding. * &#x60;video.caption.generated&#x60; This event occurs when an automatic caption has been generated. * &#x60;video.summary.generated&#x60; This event occurs when an automatic summary has been generated.
/// </summary>
/// <exception cref="ApiVideo.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional)</param>
Expand Down Expand Up @@ -146,7 +146,7 @@ public Task<ApiResponse<Webhook>> createWithHttpInfoAsync(WebhooksCreationPayloa


/// <summary>
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;&#x60;&#x60;video.encoding.quality.completed&#x60;&#x60;&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;&#x60;&#x60;live-stream.broadcast.started&#x60;&#x60;&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;&#x60;&#x60;live-stream.broadcast.ended&#x60;&#x60;&#x60; This event fires when a live stream has finished broadcasting. * &#x60;&#x60;&#x60;video.source.recorded&#x60;&#x60;&#x60; This event occurs when a live stream is recorded and submitted for encoding.
/// Create Webhook Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: * &#x60;video.encoding.quality.completed&#x60; 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 &#x60;&#x60;&#x60;{ \&quot;type\&quot;: \&quot;video.encoding.quality.completed\&quot;, \&quot;emittedAt\&quot;: \&quot;2021-01-29T16:46:25.217+01:00\&quot;, \&quot;videoId\&quot;: \&quot;viXXXXXXXX\&quot;, \&quot;encoding\&quot;: \&quot;hls\&quot;, \&quot;quality\&quot;: \&quot;720p\&quot;} &#x60;&#x60;&#x60;. This request says that the 720p HLS encoding was completed. * &#x60;live-stream.broadcast.started&#x60; When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * &#x60;live-stream.broadcast.ended&#x60; This event fires when a live stream has finished broadcasting. * &#x60;video.source.recorded&#x60; This event occurs when a live stream is recorded and submitted for encoding. * &#x60;video.caption.generated&#x60; This event occurs when an automatic caption has been generated. * &#x60;video.summary.generated&#x60; This event occurs when an automatic summary has been generated.
/// </summary>
/// <exception cref="ApiVideo.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="webhooksCreationPayload"></param>
Expand Down
4 changes: 2 additions & 2 deletions src/Model/WebhooksCreationPayload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace ApiVideo.Model {
[DataContract]
public class WebhooksCreationPayload: DeepObject {
/// <summary>
/// A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```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``` Occurs when a live stream is recorded and submitted for encoding.
/// An array of webhook events that you want to subscribe to.
/// </summary>
/// <value>A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```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``` Occurs when a live stream is recorded and submitted for encoding.</value>
/// <value>An array of webhook events that you want to subscribe to.</value>
[DataMember(Name="events", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "events")]
public List<string> events { get; set; }
Expand Down

0 comments on commit 1fb2ef3

Please sign in to comment.