Skip to content

Commit

Permalink
Add video tags endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Oct 2, 2024
1 parent 8366500 commit a52c70e
Show file tree
Hide file tree
Showing 15 changed files with 604 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
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 @@
17ac0a7b292afb851962592fd7280e7727bb901d5d4e2a3f75808aa76a1ecdf5
90e6e7ef75b7c643044945edbbc936312cc4a55f771f7aae7f3594f72eed5b8a
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- [ChaptersApi](#chaptersapi)
- [LiveStreamsApi](#livestreamsapi)
- [PlayerThemesApi](#playerthemesapi)
- [TagsApi](#tagsapi)
- [UploadTokensApi](#uploadtokensapi)
- [VideosApi](#videosapi)
- [WatermarksApi](#watermarksapi)
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions docs/ListTagsResponse.md
Original file line number Diff line number Diff line change
@@ -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)

11 changes: 11 additions & 0 deletions docs/ListTagsResponseData.md
Original file line number Diff line number Diff line change
@@ -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)

84 changes: 84 additions & 0 deletions docs/TagsApi.md
Original file line number Diff line number Diff line change
@@ -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


<a name="listtags"></a>
# **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 &#x60;value&#x60;. These are the available fields to sort by: - &#x60;value&#x60;: Sorts the results based on tag values in alphabetic order. - &#x60;videoCount&#x60;: Sorts the results based on the number of times a video tag is used. | [optional]
**sortOrder** | **string**| Use this parameter to sort results. &#x60;asc&#x60; is ascending and sorts from A to Z. &#x60;desc&#x60; 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. <br> * X-RateLimit-Remaining - The number of available requests left for the current time window. <br> * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. <br> |
| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute. <br> * X-RateLimit-Remaining - The number of available requests left for the current time window. <br> * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. <br> |

[[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)

Loading

0 comments on commit a52c70e

Please sign in to comment.