diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index cb8299d..6516e6f 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -35,6 +35,8 @@ docs/FilterBy.md
docs/FilterBy1.md
docs/FilterBy2.md
docs/Link.md
+docs/ListTagsResponse.md
+docs/ListTagsResponseData.md
docs/LiveStream.md
docs/LiveStreamAssets.md
docs/LiveStreamCreationPayload.md
@@ -58,6 +60,7 @@ docs/Quality.md
docs/RefreshTokenPayload.md
docs/RestreamsRequestObject.md
docs/RestreamsResponseObject.md
+docs/TagsApi.md
docs/TokenCreationPayload.md
docs/TokenListResponse.md
docs/TooManyRequests.md
@@ -97,6 +100,7 @@ src/ApiVideo.Test/Api/CaptionsApiTests.cs
src/ApiVideo.Test/Api/ChaptersApiTests.cs
src/ApiVideo.Test/Api/LiveStreamsApiTests.cs
src/ApiVideo.Test/Api/PlayerThemesApiTests.cs
+src/ApiVideo.Test/Api/TagsApiTests.cs
src/ApiVideo.Test/Api/UploadTokensApiTests.cs
src/ApiVideo.Test/Api/VideosApiTests.cs
src/ApiVideo.Test/Api/WatermarksApiTests.cs
@@ -129,6 +133,8 @@ src/ApiVideo.Test/Model/FilterBy1Tests.cs
src/ApiVideo.Test/Model/FilterBy2Tests.cs
src/ApiVideo.Test/Model/FilterByTests.cs
src/ApiVideo.Test/Model/LinkTests.cs
+src/ApiVideo.Test/Model/ListTagsResponseDataTests.cs
+src/ApiVideo.Test/Model/ListTagsResponseTests.cs
src/ApiVideo.Test/Model/LiveStreamAssetsTests.cs
src/ApiVideo.Test/Model/LiveStreamCreationPayloadTests.cs
src/ApiVideo.Test/Model/LiveStreamListResponseTests.cs
@@ -182,6 +188,7 @@ src/ApiVideo/Api/CaptionsApi.cs
src/ApiVideo/Api/ChaptersApi.cs
src/ApiVideo/Api/LiveStreamsApi.cs
src/ApiVideo/Api/PlayerThemesApi.cs
+src/ApiVideo/Api/TagsApi.cs
src/ApiVideo/Api/UploadTokensApi.cs
src/ApiVideo/Api/VideosApi.cs
src/ApiVideo/Api/WatermarksApi.cs
@@ -224,6 +231,8 @@ src/ApiVideo/Model/FilterBy2.cs
src/ApiVideo/Model/IUploadPartProgressListener.cs
src/ApiVideo/Model/IUploadProgressListener.cs
src/ApiVideo/Model/Link.cs
+src/ApiVideo/Model/ListTagsResponse.cs
+src/ApiVideo/Model/ListTagsResponseData.cs
src/ApiVideo/Model/LiveStream.cs
src/ApiVideo/Model/LiveStreamAssets.cs
src/ApiVideo/Model/LiveStreamCreationPayload.cs
diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
index c691017..0b1c058 100644
--- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
+++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
@@ -1 +1 @@
-17ac0a7b292afb851962592fd7280e7727bb901d5d4e2a3f75808aa76a1ecdf5
\ No newline at end of file
+49fece4f39cb92341dc77e0eb7371a152903bf6aebcfa250d289efc9018b0f72
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2895918..0a1d7f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.
+## [1.6.3] - 2024-09-30
+- Add /tags API endpoint
+
## [1.6.2] - 2024-09-16
- Add discarded video endpoints
diff --git a/README.md b/README.md
index 1437126..c0dc2d4 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,7 @@
- [ChaptersApi](#chaptersapi)
- [LiveStreamsApi](#livestreamsapi)
- [PlayerThemesApi](#playerthemesapi)
+ - [TagsApi](#tagsapi)
- [UploadTokensApi](#uploadtokensapi)
- [VideosApi](#videosapi)
- [WatermarksApi](#watermarksapi)
@@ -258,6 +259,22 @@ Method | HTTP request | Description
[**deleteLogo**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#deleteLogo) | **DELETE** `/players/{playerId}/logo` | Delete logo
+#### TagsApi
+
+
+##### Retrieve an instance of TagsApi:
+```java
+ApiVideoClient apiVideoClient = new ApiVideoClient("YOUR_API_KEY");
+TagsApi tags = client.Tags()
+```
+
+##### Endpoints
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TagsApi.md#list) | **GET** `/tags` | List all video tags
+
+
#### UploadTokensApi
@@ -372,6 +389,8 @@ Method | HTTP request | Description
- [FilterBy1](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/FilterBy1.md)
- [FilterBy2](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/FilterBy2.md)
- [Link](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Link.md)
+ - [ListTagsResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ListTagsResponse.md)
+ - [ListTagsResponseData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ListTagsResponseData.md)
- [LiveStream](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStream.md)
- [LiveStreamAssets](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamAssets.md)
- [LiveStreamCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamCreationPayload.md)
diff --git a/docs/ListTagsResponse.md b/docs/ListTagsResponse.md
new file mode 100644
index 0000000..cf3bfe8
--- /dev/null
+++ b/docs/ListTagsResponse.md
@@ -0,0 +1,11 @@
+# ApiVideo.Model.ListTagsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Data** | [**List<ListTagsResponseData>**](ListTagsResponseData.md) | | [optional]
+**Pagination** | [**Pagination**](Pagination.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/docs/ListTagsResponseData.md b/docs/ListTagsResponseData.md
new file mode 100644
index 0000000..c783d1b
--- /dev/null
+++ b/docs/ListTagsResponseData.md
@@ -0,0 +1,11 @@
+# ApiVideo.Model.ListTagsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Value** | **string** | Returns the value of a video tag used in your project. | [optional]
+**VideoCount** | **int** | Returns the number of times a video tag is used. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/docs/TagsApi.md b/docs/TagsApi.md
new file mode 100644
index 0000000..52d1a46
--- /dev/null
+++ b/docs/TagsApi.md
@@ -0,0 +1,84 @@
+# ApiVideo.Api.TagsApi
+
+All URIs are relative to *https://ws.api.video*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list**](TagsApi.md#listtags) | **GET** /tags | List all video tags
+
+
+
+# **list**
+> ListTagsResponse list (string value = null, string sortBy = null, string sortOrder = null, int? currentPage = null, int? pageSize = null)
+
+List all video tags
+
+This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+
+### Example
+```csharp
+using System.Diagnostics;
+using ApiVideo.Client;
+
+namespace Example
+{
+ public class listExample
+ {
+ public static void Main()
+ {
+ var basePath = ApiVideoClient.Client.Environment.SANDBOX;
+ var apiKey = "YOUR_API_KEY";
+
+ var apiInstance = new ApiVideoClient(apiKey,basePath);
+
+ var value = value_example; // string | Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+ var sortBy = value; // string | Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+ var sortOrder = asc; // string | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+ var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1)
+ var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25)
+ var apiTagsInstance = apiInstance.Tags();
+ try
+ {
+ // List all video tags
+ ListTagsResponse result = apiTagsInstance.list(value, sortBy, sortOrder, currentPage, pageSize);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling TagsApi.list: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **value** | **string**| Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | [optional]
+ **sortBy** | **string**| Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. | [optional]
+ **sortOrder** | **string**| Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. | [optional]
+ **currentPage** | **int?**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
+ **pageSize** | **int?**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
+
+### Return type
+
+[**ListTagsResponse**](ListTagsResponse.md)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### 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.
|
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/Webhook.md b/docs/Webhook.md
index 273f032..6e00000 100644
--- a/docs/Webhook.md
+++ b/docs/Webhook.md
@@ -4,10 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**WebhookId** | **string** | Unique identifier of the webhook | [optional]
-**CreatedAt** | **DateTime** | When an webhook was created, presented in ATOM UTC format. | [optional]
-**Events** | **List<string>** | A list of events that will trigger the webhook. | [optional]
-**Url** | **string** | URL of the webhook | [optional]
+**WebhookId** | **string** | A unique identifier of the webhook you subscribed to. | [optional]
+**CreatedAt** | **DateTime** | The time and date when you created this webhook subscription, in ATOM UTC format. | [optional]
+**Events** | **List<string>** | A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided. | [optional]
+**Url** | **string** | The URL where the API sends the webhook. | [optional]
+**SignatureSecret** | **string** | A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/src/Api/TagsApi.cs b/src/Api/TagsApi.cs
new file mode 100644
index 0000000..dc9716e
--- /dev/null
+++ b/src/Api/TagsApi.cs
@@ -0,0 +1,319 @@
+/*
+ * api.video
+ *
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using System.IO;
+using ApiVideo.Upload;
+using RestSharp;
+using ApiVideo.Client;
+using ApiVideo.Model;
+
+namespace ApiVideo.Api
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public class TagsApi
+ {
+ ///
+ /// Api Client Instance
+ ///
+ public ApiClient ApiClient {get; set;}
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public TagsApi(ApiClient apiClient)
+ {
+ this.ApiClient = apiClient;
+ }
+
+ ///
+ /// List all video tags This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+ ///
+ /// Thrown when fails to make API call
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional)
+ /// Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+/// Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+/// Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+/// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
+/// Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
+
+ /// ListTagsResponse
+ public Task listAsync(string value = default, string sortBy = default, string sortOrder = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default)
+ {
+ Task> localVarResponse = listWithHttpInfoAsync(value, sortBy, sortOrder, currentPage, pageSize, cancellationToken);
+ return localVarResponse.ContinueWith((Task> task) => task.Result.Data );
+
+ }
+
+ ///
+ /// List all video tags This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+ ///
+ /// Thrown when fails to make API call
+ /// Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+/// Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+/// Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+/// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
+/// Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
+
+ /// ListTagsResponse
+ public ListTagsResponse list(string value = default, string sortBy = default, string sortOrder = default, int? currentPage = default, int? pageSize = default)
+ {
+ ApiResponse localVarResponse = listWithHttpInfo(value, sortBy, sortOrder, currentPage, pageSize);
+ return localVarResponse.Data;
+ }
+
+
+ ///
+ /// List all video tags This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+ ///
+ /// Thrown when fails to make API call
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional)
+ /// Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+/// Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+/// Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+/// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
+/// Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
+
+ /// ApiResponse of ListTagsResponse
+ public Task> listWithHttpInfoAsync(string value = default, string sortBy = default, string sortOrder = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default)
+ {
+
+
+
+
+
+
+
+ var localVarPath = "/tags";
+ var localVarPathParams = new Dictionary();
+ var localVarQueryParams = new List>();
+ var localVarHeaderParams = new Dictionary();
+ var localVarFormParams = new Dictionary();
+ var localVarFileParams = new Dictionary();
+ Object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ string[] localVarContentTypes = new string[] {
+ };
+ string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.Add("Content-Type", localVarContentType);
+ // to determine the Accept header
+ string[] localVarHttpHeaderAccepts = new string[] {
+ "application/json"
+ };
+ string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (value != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "value", value)); // query parameter
+ if (sortBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "sortBy", sortBy)); // query parameter
+ if (sortOrder != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "sortOrder", sortOrder)); // query parameter
+ if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter
+ if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter
+
+
+
+
+ // make the HTTP request
+ Task localVarResponse = (Task) this.ApiClient.CallApiAsync(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarContentType, cancellationToken);
+
+
+ return localVarResponse.ContinueWith((Task task) =>
+ {
+ int localVarStatusCode = (int) task.Result.StatusCode;
+ return new ApiResponse(localVarStatusCode,
+ task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
+ (ListTagsResponse) this.ApiClient.Deserialize(task.Result, typeof(ListTagsResponse)));
+ });
+
+ }
+
+
+ ///
+ /// List all video tags This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+ ///
+ /// Thrown when fails to make API call
+ /// Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+/// Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+/// Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+/// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
+/// Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
+
+ /// ApiResponse of ListTagsResponse
+ public ApiResponse listWithHttpInfo(string value = default, string sortBy = default, string sortOrder = default, int? currentPage = default, int? pageSize = default)
+ {
+
+
+
+
+
+
+
+ var localVarPath = "/tags";
+ var localVarPathParams = new Dictionary();
+ var localVarQueryParams = new List>();
+ var localVarHeaderParams = new Dictionary();
+ var localVarFormParams = new Dictionary();
+ var localVarFileParams = new Dictionary();
+ Object localVarPostBody = null;
+
+ // to determine the Content-Type header
+ string[] localVarContentTypes = new string[] {
+ };
+ string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.Add("Content-Type", localVarContentType);
+ // to determine the Accept header
+ string[] localVarHttpHeaderAccepts = new string[] {
+ "application/json"
+ };
+ string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ if (value != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "value", value)); // query parameter
+ if (sortBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "sortBy", sortBy)); // query parameter
+ if (sortOrder != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "sortOrder", sortOrder)); // query parameter
+ if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter
+ if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter
+
+
+
+
+ // make the HTTP request
+ RestResponse localVarResponse = (RestResponse) this.ApiClient.CallApi(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+ localVarPathParams, localVarContentType);
+
+ int localVarStatusCode = (int) localVarResponse.StatusCode;
+ return new ApiResponse(localVarStatusCode,
+ localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
+ (ListTagsResponse) this.ApiClient.Deserialize(localVarResponse, typeof(ListTagsResponse)));
+
+ }
+
+
+ ///
+ /// This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
+ ///
+ /// APIlistRequest
+ public APIlistRequest list() {
+ return new APIlistRequest(this);
+ }
+
+ ///
+ /// Request list class to get paginated list of items
+ ///
+ public class APIlistRequest {
+ private string value;
+ private string sortBy;
+ private string sortOrder;
+ private int? currentPage;
+ private int? pageSize;
+
+ private TagsApi currentApiInstance;
+
+ ///
+ /// Class constructor with api instance
+ ///
+ /// Instance of the current api
+ public APIlistRequest(TagsApi instance) {
+ this.currentApiInstance = instance;
+ }
+
+ ///
+ /// Set value
+ ///
+ /// Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+ /// APIlistRequest
+ public APIlistRequest Value(string value) {
+ this.value = value;
+ return this;
+ }
+
+ ///
+ /// Set sortBy
+ ///
+ /// Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. (optional)
+ /// APIlistRequest
+ public APIlistRequest SortBy(string sortBy) {
+ this.sortBy = sortBy;
+ return this;
+ }
+
+ ///
+ /// Set sortOrder
+ ///
+ /// Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
+ /// APIlistRequest
+ public APIlistRequest SortOrder(string sortOrder) {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+
+ ///
+ /// Set currentPage
+ ///
+ /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
+ /// APIlistRequest
+ public APIlistRequest CurrentPage(int? currentPage) {
+ this.currentPage = currentPage;
+ return this;
+ }
+
+ ///
+ /// Set pageSize
+ ///
+ /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
+ /// APIlistRequest
+ public APIlistRequest PageSize(int? pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+
+
+ ///
+ /// Execute list request
+ ///
+ /// ListTagsResponse
+ public Page execute(){
+ ApiResponse localVarResp = this.currentApiInstance.listWithHttpInfo(value, sortBy, sortOrder, currentPage, pageSize);
+ return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => {
+ try {
+ return copy().CurrentPage((currentPage == null ? 1 : currentPage) + 1).execute();
+ } catch (ApiException e) {
+ throw new Exception(e.Message);
+ }
+ });
+ }
+
+ private APIlistRequest copy() {
+ APIlistRequest copy = new APIlistRequest( this.currentApiInstance);
+ copy.Value(value);
+ copy.SortBy(sortBy);
+ copy.SortOrder(sortOrder);
+ copy.CurrentPage(currentPage);
+ copy.PageSize(pageSize);
+ return copy;
+ }
+ }
+
+ }
+
+}
diff --git a/src/ApiVideo.cs b/src/ApiVideo.cs
index 9e8d36f..00bd077 100644
--- a/src/ApiVideo.cs
+++ b/src/ApiVideo.cs
@@ -13,6 +13,7 @@ public class ApiVideoClient {
private readonly ChaptersApi chapters;
private readonly LiveStreamsApi liveStreams;
private readonly PlayerThemesApi playerThemes;
+ private readonly TagsApi tags;
private readonly UploadTokensApi uploadTokens;
private readonly VideosApi videos;
private readonly WatermarksApi watermarks;
@@ -69,6 +70,7 @@ private ApiVideoClient(ApiClient apiClient) {
this.chapters = new ChaptersApi(this.apiClient);
this.liveStreams = new LiveStreamsApi(this.apiClient);
this.playerThemes = new PlayerThemesApi(this.apiClient);
+ this.tags = new TagsApi(this.apiClient);
this.uploadTokens = new UploadTokensApi(this.apiClient);
this.videos = new VideosApi(this.apiClient);
this.watermarks = new WatermarksApi(this.apiClient);
@@ -116,6 +118,14 @@ public PlayerThemesApi PlayerThemes() {
return this.playerThemes;
}
+ ///
+ /// Get an TagsApi instance
+ ///
+ /// TagsApi
+ public TagsApi Tags() {
+ return this.tags;
+ }
+
///
/// Get an UploadTokensApi instance
///
diff --git a/src/ApiVideo.csproj b/src/ApiVideo.csproj
index 0a479ee..1e0e84d 100644
--- a/src/ApiVideo.csproj
+++ b/src/ApiVideo.csproj
@@ -13,7 +13,7 @@ The version of the OpenAPI document: 1
Library
true
ApiVideo
- 1.6.2
+ 1.6.3
api.video
api.video csharp API client
MIT
diff --git a/src/Client/ApiClient.cs b/src/Client/ApiClient.cs
index 9817892..55c7798 100644
--- a/src/Client/ApiClient.cs
+++ b/src/Client/ApiClient.cs
@@ -95,7 +95,7 @@ public ApiClient(IRestClient client) {
private void Initialize(IRestClient client)
{
this.RestClient = client;
- setName("AV-Origin-Client", "csharp", "1.6.2");
+ setName("AV-Origin-Client", "csharp", "1.6.3");
}
///
diff --git a/src/Model/ListTagsResponse.cs b/src/Model/ListTagsResponse.cs
new file mode 100644
index 0000000..bd4026c
--- /dev/null
+++ b/src/Model/ListTagsResponse.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+
+namespace ApiVideo.Model {
+
+ ///
+ ///
+ ///
+ [DataContract]
+ public class ListTagsResponse: DeepObject {
+ ///
+ /// Gets or Sets Data
+ ///
+ [DataMember(Name="data", EmitDefaultValue=false)]
+ [JsonProperty(PropertyName = "data")]
+ public List data { get; set; }
+ ///
+ /// Gets or Sets Pagination
+ ///
+ [DataMember(Name="pagination", EmitDefaultValue=false)]
+ [JsonProperty(PropertyName = "pagination")]
+ public Pagination pagination { get; set; }
+
+
+ ///
+ /// Get the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString() {
+ var sb = new StringBuilder();
+ sb.Append("class ListTagsResponse {\n");
+ sb.Append(" Data: ").Append(data).Append("\n");
+ sb.Append(" Pagination: ").Append(pagination).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Get the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public string ToJson() {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+
+}
+}
diff --git a/src/Model/ListTagsResponseData.cs b/src/Model/ListTagsResponseData.cs
new file mode 100644
index 0000000..83b080d
--- /dev/null
+++ b/src/Model/ListTagsResponseData.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+
+namespace ApiVideo.Model {
+
+ ///
+ ///
+ ///
+ [DataContract]
+ public class ListTagsResponseData: DeepObject {
+ ///
+ /// Returns the value of a video tag used in your project.
+ ///
+ /// Returns the value of a video tag used in your project.
+ [DataMember(Name="value", EmitDefaultValue=false)]
+ [JsonProperty(PropertyName = "value")]
+ public string value { get; set; }
+ ///
+ /// Returns the number of times a video tag is used.
+ ///
+ /// Returns the number of times a video tag is used.
+ [DataMember(Name="videoCount", EmitDefaultValue=false)]
+ [JsonProperty(PropertyName = "videoCount")]
+ public int videocount { get; set; }
+
+
+ ///
+ /// Get the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString() {
+ var sb = new StringBuilder();
+ sb.Append("class ListTagsResponseData {\n");
+ sb.Append(" Value: ").Append(value).Append("\n");
+ sb.Append(" VideoCount: ").Append(videocount).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Get the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public string ToJson() {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+
+}
+}
diff --git a/src/Model/Webhook.cs b/src/Model/Webhook.cs
index a6144c2..2105c04 100644
--- a/src/Model/Webhook.cs
+++ b/src/Model/Webhook.cs
@@ -13,33 +13,40 @@ namespace ApiVideo.Model {
[DataContract]
public class Webhook: DeepObject {
///
- /// Unique identifier of the webhook
+ /// A unique identifier of the webhook you subscribed to.
///
- /// Unique identifier of the webhook
+ /// A unique identifier of the webhook you subscribed to.
[DataMember(Name="webhookId", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "webhookId")]
public string webhookid { get; set; }
///
- /// When an webhook was created, presented in ATOM UTC format.
+ /// The time and date when you created this webhook subscription, in ATOM UTC format.
///
- /// When an webhook was created, presented in ATOM UTC format.
+ /// The time and date when you created this webhook subscription, in ATOM UTC format.
[DataMember(Name="createdAt", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "createdAt")]
public DateTime? createdat { get; set; }
///
- /// A list of events that will trigger the webhook.
+ /// A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
///
- /// A list of events that will trigger the webhook.
+ /// A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
[DataMember(Name="events", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "events")]
public List events { get; set; }
///
- /// URL of the webhook
+ /// The URL where the API sends the webhook.
///
- /// URL of the webhook
+ /// The URL where the API sends the webhook.
[DataMember(Name="url", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "url")]
public string url { get; set; }
+ ///
+ /// A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.
+ ///
+ /// A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.
+ [DataMember(Name="signatureSecret", EmitDefaultValue=false)]
+ [JsonProperty(PropertyName = "signatureSecret")]
+ public string signaturesecret { get; set; }
///
@@ -53,6 +60,7 @@ public override string ToString() {
sb.Append(" CreatedAt: ").Append(createdat).Append("\n");
sb.Append(" Events: ").Append(events).Append("\n");
sb.Append(" Url: ").Append(url).Append("\n");
+ sb.Append(" SignatureSecret: ").Append(signaturesecret).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/tests/resources/payloads/tags/list/responses/200.json b/tests/resources/payloads/tags/list/responses/200.json
new file mode 100644
index 0000000..3501e31
--- /dev/null
+++ b/tests/resources/payloads/tags/list/responses/200.json
@@ -0,0 +1,26 @@
+{
+ "data" : [ {
+ "value" : "maths",
+ "videoCount" : "33"
+ }, {
+ "value" : "tutorials",
+ "videoCount" : "10"
+ } ],
+ "pagination" : {
+ "currentPage" : 1,
+ "pageSize" : 25,
+ "pagesTotal" : 1,
+ "itemsTotal" : 2,
+ "currentPageItems" : 2,
+ "links" : [ {
+ "rel" : "self",
+ "uri" : "/tags?currentPage=1&pageSize=25"
+ }, {
+ "rel" : "first",
+ "uri" : "/tags?currentPage=1&pageSize=25"
+ }, {
+ "rel" : "last",
+ "uri" : "/tags?currentPage=1&pageSize=25"
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/tests/resources/payloads/tags/list/responses/429.json b/tests/resources/payloads/tags/list/responses/429.json
new file mode 100644
index 0000000..d312e2b
--- /dev/null
+++ b/tests/resources/payloads/tags/list/responses/429.json
@@ -0,0 +1,5 @@
+{
+ "type" : "https://docs.api.video/reference/too-many-requests",
+ "title" : "Too many requests.",
+ "status" : 429
+}
\ No newline at end of file
diff --git a/tests/resources/payloads/webhooks/list/responses/200.json b/tests/resources/payloads/webhooks/list/responses/200.json
index c9490be..8c781b8 100644
--- a/tests/resources/payloads/webhooks/list/responses/200.json
+++ b/tests/resources/payloads/webhooks/list/responses/200.json
@@ -3,19 +3,21 @@
"webhookId" : "webhook_XXXXXXXXXXXXXXX",
"createdAt" : "2021-01-08T14:12:18+00:00",
"events" : [ "video.encoding.quality.completed" ],
- "url" : "http://clientnotificationserver.com/notif?myquery=query"
+ "url" : "http://clientnotificationserver.com/notif?myquery=query",
+ "signatureSecret" : "sig_sec_Abcd12348RLP7VPLi7nYVh"
}, {
"webhookId" : "webhook_XXXXXXXXXYYYYYY",
"createdAt" : "2021-01-12T12:12:12+00:00",
"events" : [ "video.encoding.quality.completed" ],
- "url" : "http://clientnotificationserver.com/notif?myquery=query2"
+ "url" : "http://clientnotificationserver.com/notif?myquery=query2",
+ "signatureSecret" : "sig_sec_Abcd12358RLP7VPLi7nYVy"
} ],
"pagination" : {
"currentPage" : 1,
"pageSize" : 25,
"pagesTotal" : 1,
- "itemsTotal" : 11,
- "currentPageItems" : 11,
+ "itemsTotal" : 2,
+ "currentPageItems" : 2,
"links" : [ {
"rel" : "self",
"uri" : "https://ws.api.video/webhooks?currentPage=1"