-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
olivierapivideo
authored
Sep 27, 2024
1 parent
5e74aa0
commit 90bdd53
Showing
15 changed files
with
334 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# TagsApi | ||
|
||
All URIs are relative to *https://ws.api.video* | ||
|
||
| Method | Description | HTTP request | | ||
| ------------- | ------------- | ------------- | | ||
| [**list()**](TagsApi.md#list) | List all video tags | **GET** /tags | | ||
|
||
|
||
<a name="list"></a> | ||
## **`list()` - 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. | ||
|
||
### Parameters | ||
|
||
| Name | Type | Required | Description | | ||
| ------------- | ------------- | ------------- | ------------- | | ||
| **value** | **string**| no| Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | | ||
| **sortBy** | **'value' \| 'videoCount'**| no| 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. | | ||
| **sortOrder** | **'asc' \| 'desc'**| no| Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. | | ||
| **currentPage** | **number**| no| Choose the number of search results to return per page. Minimum value: 1 | | ||
| **pageSize** | **number**| no| Results per page. Allowed values 1-100, default is 25. | | ||
|
||
|
||
### Return type | ||
|
||
Promise<[**ListTagsResponse**](../model/ListTagsResponse.md)>. | ||
|
||
|
||
|
||
|
||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
# ListTagsResponse | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**data** | [**Array<ListTagsResponseData>**](ListTagsResponseData.md) | | [optional] | ||
**pagination** | [**Pagination**](Pagination.md) | | [optional] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
# ListTagsResponseData | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**value** | **string** | Returns the value of a video tag used in your project. | [optional] | ||
**videoCount** | **number** | Returns the number of times a video tag is used. | [optional] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/** | ||
* @api.video/nodejs-client | ||
* 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 | ||
* | ||
* | ||
* NOTE: This class is auto generated. | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { URLSearchParams } from 'url'; | ||
import ObjectSerializer from '../ObjectSerializer'; | ||
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient'; | ||
import ListTagsResponse from '../model/ListTagsResponse'; | ||
|
||
/** | ||
* no description | ||
*/ | ||
export default class TagsApi { | ||
private httpClient: HttpClient; | ||
|
||
constructor(httpClient: HttpClient) { | ||
this.httpClient = httpClient; | ||
} | ||
|
||
/** | ||
* 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. | ||
* List all video tags | ||
* @param value Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | ||
* @param 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. | ||
* @param 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. | ||
* @param currentPage Choose the number of search results to return per page. Minimum value: 1 | ||
* @param pageSize Results per page. Allowed values 1-100, default is 25. | ||
*/ | ||
public async list( | ||
value?: string, | ||
sortBy?: 'value' | 'videoCount', | ||
sortOrder?: 'asc' | 'desc', | ||
currentPage?: number, | ||
pageSize?: number | ||
): Promise<ListTagsResponse> { | ||
return this.listWithResponseHeaders( | ||
value, | ||
sortBy, | ||
sortOrder, | ||
currentPage, | ||
pageSize | ||
).then((res) => res.body); | ||
} | ||
|
||
/** | ||
* 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. | ||
* List all video tags | ||
* @param value Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | ||
* @param 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. | ||
* @param 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. | ||
* @param currentPage Choose the number of search results to return per page. Minimum value: 1 | ||
* @param pageSize Results per page. Allowed values 1-100, default is 25. | ||
*/ | ||
public async listWithResponseHeaders( | ||
value?: string, | ||
sortBy?: 'value' | 'videoCount', | ||
sortOrder?: 'asc' | 'desc', | ||
currentPage?: number, | ||
pageSize?: number | ||
): Promise<{ headers: ApiResponseHeaders; body: ListTagsResponse }> { | ||
const queryParams: QueryOptions = {}; | ||
queryParams.headers = {}; | ||
// Path Params | ||
const localVarPath = '/tags'.substring(1); | ||
|
||
// Query Params | ||
const urlSearchParams = new URLSearchParams(); | ||
|
||
if (value !== undefined) { | ||
urlSearchParams.append( | ||
'value', | ||
ObjectSerializer.serialize(value, 'string', '') | ||
); | ||
} | ||
if (sortBy !== undefined) { | ||
urlSearchParams.append( | ||
'sortBy', | ||
ObjectSerializer.serialize(sortBy, "'value' | 'videoCount'", '') | ||
); | ||
} | ||
if (sortOrder !== undefined) { | ||
urlSearchParams.append( | ||
'sortOrder', | ||
ObjectSerializer.serialize(sortOrder, "'asc' | 'desc'", '') | ||
); | ||
} | ||
if (currentPage !== undefined) { | ||
urlSearchParams.append( | ||
'currentPage', | ||
ObjectSerializer.serialize(currentPage, 'number', '') | ||
); | ||
} | ||
if (pageSize !== undefined) { | ||
urlSearchParams.append( | ||
'pageSize', | ||
ObjectSerializer.serialize(pageSize, 'number', '') | ||
); | ||
} | ||
|
||
queryParams.searchParams = urlSearchParams; | ||
|
||
queryParams.method = 'GET'; | ||
|
||
return this.httpClient.call(localVarPath, queryParams).then((response) => { | ||
return { | ||
headers: response.headers, | ||
body: ObjectSerializer.deserialize( | ||
ObjectSerializer.parse( | ||
response.body, | ||
response.headers['content-type'] | ||
), | ||
'ListTagsResponse', | ||
'' | ||
) as ListTagsResponse, | ||
}; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* @api.video/nodejs-client | ||
* 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 | ||
* | ||
* | ||
* NOTE: This class is auto generated. | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import AttributeType from './AttributeType.js'; | ||
import ListTagsResponseData from './ListTagsResponseData.js'; | ||
import Pagination from './Pagination.js'; | ||
|
||
export default class ListTagsResponse { | ||
'data'?: Array<ListTagsResponseData>; | ||
'pagination'?: Pagination; | ||
|
||
static readonly discriminator?: string = undefined; | ||
|
||
static readonly attributeTypeMap: Array<AttributeType> = [ | ||
{ | ||
name: 'data', | ||
baseName: 'data', | ||
type: 'Array<ListTagsResponseData>', | ||
format: '', | ||
}, | ||
{ | ||
name: 'pagination', | ||
baseName: 'pagination', | ||
type: 'Pagination', | ||
format: '', | ||
}, | ||
]; | ||
|
||
static getAttributeTypeMap(): Array<AttributeType> { | ||
return ListTagsResponse.attributeTypeMap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @api.video/nodejs-client | ||
* 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 | ||
* | ||
* | ||
* NOTE: This class is auto generated. | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import AttributeType from './AttributeType.js'; | ||
|
||
export default class ListTagsResponseData { | ||
/** | ||
* Returns the value of a video tag used in your project. | ||
*/ | ||
'value'?: string; | ||
/** | ||
* Returns the number of times a video tag is used. | ||
*/ | ||
'videoCount'?: number; | ||
|
||
static readonly discriminator?: string = undefined; | ||
|
||
static readonly attributeTypeMap: Array<AttributeType> = [ | ||
{ | ||
name: 'value', | ||
baseName: 'value', | ||
type: 'string', | ||
format: '', | ||
}, | ||
{ | ||
name: 'videoCount', | ||
baseName: 'videoCount', | ||
type: 'number', | ||
format: '', | ||
}, | ||
]; | ||
|
||
static getAttributeTypeMap(): Array<AttributeType> { | ||
return ListTagsResponseData.attributeTypeMap; | ||
} | ||
} |
Oops, something went wrong.