-
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
Oct 2, 2024
1 parent
5e74aa0
commit 6200083
Showing
16 changed files
with
338 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,127 @@ | ||
/** | ||
* @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 {Object} searchParams | ||
* @param { string } searchParams.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 { 'value' | 'videoCount' } searchParams.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 { 'asc' | 'desc' } searchParams.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 { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 | ||
* @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. | ||
*/ | ||
public async list(args: { | ||
value?: string; | ||
sortBy?: 'value' | 'videoCount'; | ||
sortOrder?: 'asc' | 'desc'; | ||
currentPage?: number; | ||
pageSize?: number; | ||
}): Promise<ListTagsResponse> { | ||
return this.listWithResponseHeaders(args).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 {Object} searchParams | ||
* @param { string } searchParams.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 { 'value' | 'videoCount' } searchParams.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 { 'asc' | 'desc' } searchParams.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 { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 | ||
* @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. | ||
*/ | ||
public async listWithResponseHeaders({ | ||
value, | ||
sortBy, | ||
sortOrder, | ||
currentPage, | ||
pageSize, | ||
}: { | ||
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.