diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b40a47..a4cb875 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.
+## [1.4.3] - 2024-09-30
+- Add /tags API endpoint
+
## [1.4.2] - 2024-09-16
- Add discarded video endpoints
diff --git a/README.md b/README.md
index 16becda..926285f 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,7 @@
- [ChaptersApi](#)
- [LiveStreamsApi](#)
- [PlayerThemesApi](#)
+ - [TagsApi](#)
- [UploadTokensApi](#)
- [VideosApi](#)
- [WatermarksApi](#)
@@ -176,6 +177,14 @@ Method | HTTP request | Description
[**delete_logo**](https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#delete_logo) | **DELETE** `/players/{playerId}/logo` | Delete logo
+### TagsApi
+
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list**](https://github.com/apivideo/api.video-python-client/blob/main/docs/TagsApi.md#list) | **GET** `/tags` | List all video tags
+
+
### UploadTokensApi
@@ -259,6 +268,8 @@ Method | HTTP request | Description
- [FilterBy1](https://github.com/apivideo/api.video-python-client/blob/main/docs/FilterBy1.md)
- [FilterBy2](https://github.com/apivideo/api.video-python-client/blob/main/docs/FilterBy2.md)
- [Link](https://github.com/apivideo/api.video-python-client/blob/main/docs/Link.md)
+ - [ListTagsResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/ListTagsResponse.md)
+ - [ListTagsResponseData](https://github.com/apivideo/api.video-python-client/blob/main/docs/ListTagsResponseData.md)
- [LiveStream](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStream.md)
- [LiveStreamAssets](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamAssets.md)
- [LiveStreamCreationPayload](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamCreationPayload.md)
diff --git a/apivideo/__init__.py b/apivideo/__init__.py
index a66ffdc..4b0a82c 100644
--- a/apivideo/__init__.py
+++ b/apivideo/__init__.py
@@ -9,7 +9,7 @@
"""
-__version__ = "1.4.2"
+__version__ = "1.4.3"
# import ApiVideoClient
from apivideo.auth_api_client import AuthenticatedApiClient
diff --git a/apivideo/api/tags_api.py b/apivideo/api/tags_api.py
new file mode 100644
index 0000000..44f2383
--- /dev/null
+++ b/apivideo/api/tags_api.py
@@ -0,0 +1,191 @@
+"""
+ 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. # noqa: E501
+
+ Contact: ecosystem@api.video
+"""
+
+import os # noqa: F401
+import re # noqa: F401
+import sys # noqa: F401
+from types import MethodType
+from types import FunctionType
+
+from apivideo.api_client import ApiClient
+from apivideo.endpoint import EndPoint as _EndPoint, ChunkIO
+from apivideo.model.video_id import VideoId
+from apivideo.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from apivideo.exceptions import ApiTypeError, ApiValueError
+from apivideo.model.list_tags_response import ListTagsResponse
+from apivideo.model.too_many_requests import TooManyRequests
+
+
+class TagsApi(_EndPoint):
+
+ def list(
+ self,
+ **kwargs
+ ):
+ """List all video tags # noqa: E501
+
+ 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. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.list(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ value (str): Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. . [optional]
+ sort_by (str): 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]
+ sort_order (str): 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]
+ current_page (int): Choose the number of search results to return per page. Minimum value: 1. [optional] if omitted the server will use the default value of 1
+ page_size (int): Results per page. Allowed values 1-100, default is 25.. [optional] if omitted the server will use the default value of 25
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ListTagsResponse
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+
+ params_map = {
+ 'all': [
+ 'value',
+ 'sort_by',
+ 'sort_order',
+ 'current_page',
+ 'page_size',
+ 'async_req',
+ '_preload_content',
+ '_request_timeout',
+ '_return_http_data_only'
+ ],
+ 'required': [],
+ 'nullable': [
+ '_request_timeout'
+ ],
+ 'enum': [
+ 'sort_by',
+ 'sort_order',
+ ],
+ 'validation': [
+ ]
+ }
+ validations = {
+ }
+ allowed_values = {
+ ('sort_by',): {
+
+ "VALUE": "value",
+ "VIDEOCOUNT": "videoCount"
+ },
+ ('sort_order',): {
+
+ "ASC": "asc",
+ "DESC": "desc"
+ },
+ }
+ openapi_types = {
+ 'value':
+ (str,),
+ 'sort_by':
+ (str,),
+ 'sort_order':
+ (str,),
+ 'current_page':
+ (int,),
+ 'page_size':
+ (int,),
+ 'async_req': (bool,),
+ '_preload_content': (bool,),
+ '_request_timeout': (none_type, int, (int,), [int]),
+ '_return_http_data_only': (bool,)
+ }
+ attribute_map = {
+ 'value': 'value',
+ 'sort_by': 'sortBy',
+ 'sort_order': 'sortOrder',
+ 'current_page': 'currentPage',
+ 'page_size': 'pageSize',
+ }
+ location_map = {
+ 'value': 'query',
+ 'sort_by': 'query',
+ 'sort_order': 'query',
+ 'current_page': 'query',
+ 'page_size': 'query',
+ }
+ collection_format_map = {
+ }
+
+ for key, value in kwargs.items():
+ if key not in params_map['all']:
+ raise ApiTypeError(
+ "Got an unexpected parameter '%s'"
+ " to method `list`" %
+ (key, )
+ )
+ if (key not in params_map['nullable'] and value is None):
+ raise ApiValueError(
+ "Value may not be None for non-nullable parameter `%s`"
+ " when calling `list`" %
+ (key, )
+ )
+
+ for key in params_map['required']:
+ if key not in kwargs.keys():
+ raise ApiValueError(
+ "Missing the required parameter `%s` when calling "
+ "`list`" % (key, )
+ )
+
+ self._validate_inputs(kwargs, params_map, allowed_values, validations, openapi_types)
+ params = self._gather_params(kwargs, location_map, attribute_map, openapi_types, collection_format_map)
+ return self.api_client.call_api(
+ "/tags",
+ "GET",
+ params['path'],
+ params['query'],
+ params['header'],
+ body=params['body'],
+ post_params=params['form'],
+ files=params['file'],
+ response_type=(ListTagsResponse,),
+ async_req=kwargs['async_req'],
+ _return_http_data_only=kwargs['_return_http_data_only'],
+ _preload_content=kwargs['_preload_content'],
+ _request_timeout=kwargs['_request_timeout'],
+ collection_formats=params['collection_format'])
+
diff --git a/apivideo/api_client.py b/apivideo/api_client.py
index 1f066ec..c30360a 100644
--- a/apivideo/api_client.py
+++ b/apivideo/api_client.py
@@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
- self.default_headers['AV-Origin-Client'] = "python:1.4.2"
+ self.default_headers['AV-Origin-Client'] = "python:1.4.3"
def __enter__(self):
return self
diff --git a/apivideo/apis/__init__.py b/apivideo/apis/__init__.py
index 71898ae..ee624e0 100644
--- a/apivideo/apis/__init__.py
+++ b/apivideo/apis/__init__.py
@@ -19,6 +19,7 @@
from apivideo.api.chapters_api import ChaptersApi
from apivideo.api.live_streams_api import LiveStreamsApi
from apivideo.api.player_themes_api import PlayerThemesApi
+from apivideo.api.tags_api import TagsApi
from apivideo.api.upload_tokens_api import UploadTokensApi
from apivideo.api.videos_api import VideosApi
from apivideo.api.watermarks_api import WatermarksApi
diff --git a/apivideo/configuration.py b/apivideo/configuration.py
index 1ff3bfd..4f8fdf3 100644
--- a/apivideo/configuration.py
+++ b/apivideo/configuration.py
@@ -391,7 +391,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1\n"\
- "SDK Package Version: 1.4.2".\
+ "SDK Package Version: 1.4.3".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
diff --git a/apivideo/model/list_tags_response.py b/apivideo/model/list_tags_response.py
new file mode 100644
index 0000000..05d63df
--- /dev/null
+++ b/apivideo/model/list_tags_response.py
@@ -0,0 +1,175 @@
+"""
+ 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. # noqa: E501
+
+ Contact: ecosystem@api.video
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from apivideo.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from apivideo.model.list_tags_response_data import ListTagsResponseData
+ from apivideo.model.pagination import Pagination
+ globals()['ListTagsResponseData'] = ListTagsResponseData
+ globals()['Pagination'] = Pagination
+
+
+class ListTagsResponse(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'data': ([ListTagsResponseData],), # noqa: E501
+ 'pagination': (Pagination,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'data': 'data', # noqa: E501
+ 'pagination': 'pagination', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ListTagsResponse - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ data ([ListTagsResponseData]): [optional] # noqa: E501
+ pagination (Pagination): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/apivideo/model/list_tags_response_data.py b/apivideo/model/list_tags_response_data.py
new file mode 100644
index 0000000..a50ef87
--- /dev/null
+++ b/apivideo/model/list_tags_response_data.py
@@ -0,0 +1,168 @@
+"""
+ 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. # noqa: E501
+
+ Contact: ecosystem@api.video
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from apivideo.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ListTagsResponseData(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'value': (str,), # noqa: E501
+ 'video_count': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'value': 'value', # noqa: E501
+ 'video_count': 'videoCount', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ListTagsResponseData - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ value (str): Returns the value of a video tag used in your project.. [optional] # noqa: E501
+ video_count (int): Returns the number of times a video tag is used.. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/docs/ListTagsResponse.md b/docs/ListTagsResponse.md
new file mode 100644
index 0000000..048d4f8
--- /dev/null
+++ b/docs/ListTagsResponse.md
@@ -0,0 +1,11 @@
+# ListTagsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**[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..8c3d77a
--- /dev/null
+++ b/docs/ListTagsResponseData.md
@@ -0,0 +1,11 @@
+# ListTagsResponseData
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **str** | Returns the value of a video tag used in your project. | [optional]
+**video_count** | **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..699adc6
--- /dev/null
+++ b/docs/TagsApi.md
@@ -0,0 +1,75 @@
+# apivideo.TagsApi
+
+All URIs are relative to *https://ws.api.video*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list**](TagsApi.md#list) | **GET** /tags | List all video tags
+
+
+# **list**
+> ListTagsResponse 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.
+
+### Example
+
+```python
+import apivideo
+from apivideo.api import tags_api
+from apivideo.model.too_many_requests import TooManyRequests
+from apivideo.model.list_tags_response import ListTagsResponse
+from pprint import pprint
+
+# Enter a context with an instance of the API client
+with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
+ # Create an instance of the API class
+ api_instance = tags_api.TagsApi(api_client)
+ value = "value_example" # str | Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. (optional)
+ sort_by = "value" # str | 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)
+ sort_order = "asc" # str | 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)
+ current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
+ page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # List all video tags
+ api_response = api_instance.list(value=value, sort_by=sort_by, sort_order=sort_order, current_page=current_page, page_size=page_size)
+ pprint(api_response)
+ except apivideo.ApiException as e:
+ print("Exception when calling TagsApi->list: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **value** | **str**| Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | [optional]
+ **sort_by** | **str**| 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]
+ **sort_order** | **str**| 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]
+ **current_page** | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] if omitted the server will use the default value of 1
+ **page_size** | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] if omitted the server will use the default value of 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/setup.py b/setup.py
index 93a5a8c..72ef9f5 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@
from setuptools import setup, find_packages # noqa: H301
NAME = "api.video"
-VERSION = "1.4.2"
+VERSION = "1.4.3"
# To install the library, run the following
#
# python setup.py install
diff --git a/test/payloads/tags/list/responses/200.json b/test/payloads/tags/list/responses/200.json
new file mode 100644
index 0000000..3501e31
--- /dev/null
+++ b/test/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/test/payloads/tags/list/responses/429.json b/test/payloads/tags/list/responses/429.json
new file mode 100644
index 0000000..d312e2b
--- /dev/null
+++ b/test/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/test/test_tags_api.py b/test/test_tags_api.py
new file mode 100644
index 0000000..884226f
--- /dev/null
+++ b/test/test_tags_api.py
@@ -0,0 +1,58 @@
+"""
+ 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. # noqa: E501
+
+ Contact: ecosystem@api.video
+"""
+
+from dateutil.parser import parse as dateutil_parser
+from urllib3_mock import Responses
+
+from apivideo.api.tags_api import TagsApi # noqa: E501
+from apivideo.exceptions import ApiException, NotFoundException
+from apivideo.model.metadata import Metadata
+from apivideo.model.video_clip import VideoClip
+from apivideo.model.video_watermark import VideoWatermark
+from apivideo.model.restreams_request_object import RestreamsRequestObject
+
+from apivideo.model.list_tags_response import ListTagsResponse
+from apivideo.model.too_many_requests import TooManyRequests
+
+from helper import MainTest
+
+
+responses = Responses()
+
+
+class TestTagsApi(MainTest):
+ """TagsApi unit test"""
+
+ def setUp(self):
+ super().setUp()
+ self.api = TagsApi(self.client) # noqa: E501
+
+ @responses.activate
+ def test_list(self):
+ """Test case for list
+
+ List all video tags # noqa: E501
+ """
+ for file_name, json in self.load_json('tags', 'list'):
+ status = file_name.split("-")[0]
+ responses.reset()
+
+ kwargs = {
+ }
+ url = '/tags'.format(**kwargs)
+
+ responses.add('GET', url, body=json, status=int(status), content_type='application/json')
+
+ if status[0] == '4':
+ with self.assertRaises(ApiException) as context:
+ self.api.list(**kwargs)
+ if status == '404':
+ self.assertIsInstance(context.exception, NotFoundException)
+ else:
+ self.api.list(**kwargs)
+