diff --git a/README.md b/README.md
index a6a5df5..c7faa4b 100644
--- a/README.md
+++ b/README.md
@@ -119,8 +119,9 @@ All URIs are relative to *https://ws.api.video*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**get_live_streams_plays**](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsApi.md#get_live_streams_plays) | **GET** `/analytics/live-streams/plays` | Get play events for live stream
-[**get_videos_plays**](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsApi.md#get_videos_plays) | **GET** `/analytics/videos/plays` | Get play events for video
+[**get_aggregated_metrics**](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsApi.md#get_aggregated_metrics) | **GET** `/data/metrics/{metric}/{aggregation}` | Retrieve aggregated metrics
+[**get_metrics_breakdown**](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsApi.md#get_metrics_breakdown) | **GET** `/data/buckets/{metric}/{breakdown}` | Retrieve metrics in a breakdown of dimensions
+[**get_metrics_over_time**](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsApi.md#get_metrics_over_time) | **GET** `/data/timeseries/{metric}` | Retrieve metrics over time
### CaptionsApi
@@ -229,7 +230,16 @@ Method | HTTP request | Description
- [AccessToken](https://github.com/apivideo/api.video-python-client/blob/main/docs/AccessToken.md)
- [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-python-client/blob/main/docs/AdditionalBadRequestErrors.md)
+ - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md)
+ - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md)
+ - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md)
- [AnalyticsData](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsData.md)
+ - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md)
+ - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md)
+ - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md)
+ - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md)
+ - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md)
+ - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md)
- [AnalyticsPlays400Error](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsPlays400Error.md)
- [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/AnalyticsPlaysResponse.md)
- [AuthenticatePayload](https://github.com/apivideo/api.video-python-client/blob/main/docs/AuthenticatePayload.md)
@@ -245,12 +255,6 @@ Method | HTTP request | Description
- [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)
- [LiveStreamListResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamListResponse.md)
- - [LiveStreamSession](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSession.md)
- - [LiveStreamSessionClient](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSessionClient.md)
- - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSessionDevice.md)
- - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSessionLocation.md)
- - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSessionReferrer.md)
- - [LiveStreamSessionSession](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamSessionSession.md)
- [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamUpdatePayload.md)
- [Metadata](https://github.com/apivideo/api.video-python-client/blob/main/docs/Metadata.md)
- [Model403ErrorSchema](https://github.com/apivideo/api.video-python-client/blob/main/docs/Model403ErrorSchema.md)
@@ -270,18 +274,12 @@ Method | HTTP request | Description
- [TokenCreationPayload](https://github.com/apivideo/api.video-python-client/blob/main/docs/TokenCreationPayload.md)
- [TokenListResponse](https://github.com/apivideo/api.video-python-client/blob/main/docs/TokenListResponse.md)
- [TooManyRequests](https://github.com/apivideo/api.video-python-client/blob/main/docs/TooManyRequests.md)
+ - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-python-client/blob/main/docs/UnrecognizedRequestUrl.md)
- [UploadToken](https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadToken.md)
- [Video](https://github.com/apivideo/api.video-python-client/blob/main/docs/Video.md)
- [VideoAssets](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoAssets.md)
- [VideoClip](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoClip.md)
- [VideoCreationPayload](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoCreationPayload.md)
- - [VideoSession](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSession.md)
- - [VideoSessionClient](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionClient.md)
- - [VideoSessionDevice](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionDevice.md)
- - [VideoSessionLocation](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionLocation.md)
- - [VideoSessionOs](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionOs.md)
- - [VideoSessionReferrer](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionReferrer.md)
- - [VideoSessionSession](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSessionSession.md)
- [VideoSource](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSource.md)
- [VideoSourceLiveStream](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSourceLiveStream.md)
- [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-python-client/blob/main/docs/VideoSourceLiveStreamLink.md)
diff --git a/apivideo/api/analytics_api.py b/apivideo/api/analytics_api.py
index d1eeda8..4493e30 100644
--- a/apivideo/api/analytics_api.py
+++ b/apivideo/api/analytics_api.py
@@ -25,37 +25,214 @@
validate_and_convert_types
)
from apivideo.exceptions import ApiTypeError, ApiValueError
+from apivideo.model.analytics_aggregated_metrics_response import AnalyticsAggregatedMetricsResponse
+from apivideo.model.analytics_metrics_breakdown_response import AnalyticsMetricsBreakdownResponse
+from apivideo.model.analytics_metrics_over_time_response import AnalyticsMetricsOverTimeResponse
from apivideo.model.analytics_plays400_error import AnalyticsPlays400Error
-from apivideo.model.analytics_plays_response import AnalyticsPlaysResponse
-from apivideo.model.model403_error_schema import Model403ErrorSchema
-from apivideo.model.not_found import NotFound
from apivideo.model.too_many_requests import TooManyRequests
+from apivideo.model.unrecognized_request_url import UnrecognizedRequestUrl
class AnalyticsApi(_EndPoint):
- def get_live_streams_plays(
+ def get_aggregated_metrics(
self,
- _from,
- dimension,
+ metric,
+ aggregation,
**kwargs
):
- """Get play events for live stream # noqa: E501
+ """Retrieve aggregated metrics # noqa: E501
- Retrieve filtered analytics about the number of plays for your live streams in a project. # noqa: E501
+ Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_live_streams_plays(_from, dimension, async_req=True)
+ >>> thread = api.get_aggregated_metrics(metric, aggregation, async_req=True)
>>> result = thread.get()
Args:
- _from (date): Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format.
- dimension (str): Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`.
+ metric (str): Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric.
+ aggregation (str): Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric.
Keyword Args:
- to (date): Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. . [optional]
- filter (str): Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID.. [optional]
+ _from (datetime): Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. . [optional]
+ to (datetime): Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. . [optional]
+ filter_by (str): Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. . [optional]
+ _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:
+ AnalyticsAggregatedMetricsResponse
+ 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
+ )
+ kwargs['metric'] = \
+ metric
+ kwargs['aggregation'] = \
+ aggregation
+
+ params_map = {
+ 'all': [
+ 'metric',
+ 'aggregation',
+ '_from',
+ 'to',
+ 'filter_by',
+ 'async_req',
+ '_preload_content',
+ '_request_timeout',
+ '_return_http_data_only'
+ ],
+ 'required': [
+ 'metric',
+ 'aggregation',
+ ],
+ 'nullable': [
+ '_request_timeout'
+ ],
+ 'enum': [
+ 'metric',
+ 'aggregation',
+ ],
+ 'validation': [
+ ]
+ }
+ validations = {
+ }
+ allowed_values = {
+ ('metric',): {
+
+ "PLAY": "play",
+ "START": "start",
+ "END": "end",
+ "IMPRESSION": "impression",
+ "IMPRESSION-TIME": "impression-time",
+ "WATCH-TIME": "watch-time"
+ },
+ ('aggregation',): {
+
+ "COUNT": "count",
+ "RATE": "rate",
+ "TOTAL": "total",
+ "AVERAGE": "average",
+ "SUM": "sum"
+ },
+ }
+ openapi_types = {
+ 'metric':
+ (str,),
+ 'aggregation':
+ (str,),
+ '_from':
+ (datetime,),
+ 'to':
+ (datetime,),
+ 'filter_by':
+ (str,),
+ 'async_req': (bool,),
+ '_preload_content': (bool,),
+ '_request_timeout': (none_type, int, (int,), [int]),
+ '_return_http_data_only': (bool,)
+ }
+ attribute_map = {
+ 'metric': 'metric',
+ 'aggregation': 'aggregation',
+ '_from': 'from',
+ 'to': 'to',
+ 'filter_by': 'filterBy',
+ }
+ location_map = {
+ 'metric': 'path',
+ 'aggregation': 'path',
+ '_from': 'query',
+ 'to': 'query',
+ 'filter_by': '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 `get_aggregated_metrics`" %
+ (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 `get_aggregated_metrics`" %
+ (key, )
+ )
+
+ for key in params_map['required']:
+ if key not in kwargs.keys():
+ raise ApiValueError(
+ "Missing the required parameter `%s` when calling "
+ "`get_aggregated_metrics`" % (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(
+ "/data/metrics/{metric}/{aggregation}",
+ "GET",
+ params['path'],
+ params['query'],
+ params['header'],
+ body=params['body'],
+ post_params=params['form'],
+ files=params['file'],
+ response_type=(AnalyticsAggregatedMetricsResponse,),
+ 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'])
+
+ def get_metrics_breakdown(
+ self,
+ metric,
+ breakdown,
+ **kwargs
+ ):
+ """Retrieve metrics in a breakdown of dimensions # noqa: E501
+
+ Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_metrics_breakdown(metric, breakdown, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ metric (str): Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback.
+ breakdown (str): Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`.
+
+ Keyword Args:
+ _from (datetime): Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` . [optional]
+ to (datetime): Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. . [optional]
+ filter_by (str): Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. . [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
@@ -70,7 +247,7 @@ def get_live_streams_plays(
async_req (bool): execute request asynchronously
Returns:
- AnalyticsPlaysResponse
+ AnalyticsMetricsBreakdownResponse
If the method is called asynchronously, returns the request
thread.
"""
@@ -86,17 +263,18 @@ def get_live_streams_plays(
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
- kwargs['_from'] = \
- _from
- kwargs['dimension'] = \
- dimension
+ kwargs['metric'] = \
+ metric
+ kwargs['breakdown'] = \
+ breakdown
params_map = {
'all': [
+ 'metric',
+ 'breakdown',
'_from',
- 'dimension',
'to',
- 'filter',
+ 'filter_by',
'current_page',
'page_size',
'async_req',
@@ -105,14 +283,15 @@ def get_live_streams_plays(
'_return_http_data_only'
],
'required': [
- '_from',
- 'dimension',
+ 'metric',
+ 'breakdown',
],
'nullable': [
'_request_timeout'
],
'enum': [
- 'dimension',
+ 'metric',
+ 'breakdown',
],
'validation': [
]
@@ -120,24 +299,36 @@ def get_live_streams_plays(
validations = {
}
allowed_values = {
- ('dimension',): {
+ ('metric',): {
+
+ "PLAY": "play",
+ "PLAY-RATE": "play-rate",
+ "PLAY-TOTAL": "play-total",
+ "START": "start",
+ "END": "end",
+ "IMPRESSION": "impression"
+ },
+ ('breakdown',): {
- "LIVESTREAMID": "liveStreamId",
- "EMITTEDAT": "emittedAt",
+ "MEDIA-ID": "media-id",
+ "MEDIA-TYPE": "media-type",
+ "CONTINENT": "continent",
"COUNTRY": "country",
- "DEVICETYPE": "deviceType",
- "OPERATINGSYSTEM": "operatingSystem",
+ "DEVICE-TYPE": "device-type",
+ "OPERATING-SYSTEM": "operating-system",
"BROWSER": "browser"
},
}
openapi_types = {
- '_from':
- (date,),
- 'dimension':
+ 'metric':
+ (str,),
+ 'breakdown':
(str,),
+ '_from':
+ (datetime,),
'to':
- (date,),
- 'filter':
+ (datetime,),
+ 'filter_by':
(str,),
'current_page':
(int,),
@@ -149,18 +340,20 @@ def get_live_streams_plays(
'_return_http_data_only': (bool,)
}
attribute_map = {
+ 'metric': 'metric',
+ 'breakdown': 'breakdown',
'_from': 'from',
- 'dimension': 'dimension',
'to': 'to',
- 'filter': 'filter',
+ 'filter_by': 'filterBy',
'current_page': 'currentPage',
'page_size': 'pageSize',
}
location_map = {
+ 'metric': 'path',
+ 'breakdown': 'path',
'_from': 'query',
- 'dimension': 'query',
'to': 'query',
- 'filter': 'query',
+ 'filter_by': 'query',
'current_page': 'query',
'page_size': 'query',
}
@@ -171,13 +364,13 @@ def get_live_streams_plays(
if key not in params_map['all']:
raise ApiTypeError(
"Got an unexpected parameter '%s'"
- " to method `get_live_streams_plays`" %
+ " to method `get_metrics_breakdown`" %
(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 `get_live_streams_plays`" %
+ " when calling `get_metrics_breakdown`" %
(key, )
)
@@ -185,13 +378,13 @@ def get_live_streams_plays(
if key not in kwargs.keys():
raise ApiValueError(
"Missing the required parameter `%s` when calling "
- "`get_live_streams_plays`" % (key, )
+ "`get_metrics_breakdown`" % (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(
- "/analytics/live-streams/plays",
+ "/data/buckets/{metric}/{breakdown}",
"GET",
params['path'],
params['query'],
@@ -199,35 +392,35 @@ def get_live_streams_plays(
body=params['body'],
post_params=params['form'],
files=params['file'],
- response_type=(AnalyticsPlaysResponse,),
+ response_type=(AnalyticsMetricsBreakdownResponse,),
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'])
- def get_videos_plays(
+ def get_metrics_over_time(
self,
- _from,
- dimension,
+ metric,
**kwargs
):
- """Get play events for video # noqa: E501
+ """Retrieve metrics over time # noqa: E501
- Retrieve filtered analytics about the number of plays for your videos in a project. # noqa: E501
+ Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_videos_plays(_from, dimension, async_req=True)
+ >>> thread = api.get_metrics_over_time(metric, async_req=True)
>>> result = thread.get()
Args:
- _from (date): Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format.
- dimension (str): Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`.
+ metric (str): Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback.
Keyword Args:
- to (date): Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. . [optional]
- filter (str): Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID.. [optional]
+ _from (datetime): Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` . [optional]
+ to (datetime): Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. . [optional]
+ interval (datetime): Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. . [optional]
+ filter_by (str): Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. . [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
@@ -242,7 +435,7 @@ def get_videos_plays(
async_req (bool): execute request asynchronously
Returns:
- AnalyticsPlaysResponse
+ AnalyticsMetricsOverTimeResponse
If the method is called asynchronously, returns the request
thread.
"""
@@ -258,17 +451,16 @@ def get_videos_plays(
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
- kwargs['_from'] = \
- _from
- kwargs['dimension'] = \
- dimension
+ kwargs['metric'] = \
+ metric
params_map = {
'all': [
+ 'metric',
'_from',
- 'dimension',
'to',
- 'filter',
+ 'interval',
+ 'filter_by',
'current_page',
'page_size',
'async_req',
@@ -277,14 +469,13 @@ def get_videos_plays(
'_return_http_data_only'
],
'required': [
- '_from',
- 'dimension',
+ 'metric',
],
'nullable': [
'_request_timeout'
],
'enum': [
- 'dimension',
+ 'metric',
],
'validation': [
]
@@ -292,24 +483,25 @@ def get_videos_plays(
validations = {
}
allowed_values = {
- ('dimension',): {
+ ('metric',): {
- "VIDEOID": "videoId",
- "EMITTEDAT": "emittedAt",
- "COUNTRY": "country",
- "DEVICETYPE": "deviceType",
- "OPERATINGSYSTEM": "operatingSystem",
- "BROWSER": "browser"
+ "PLAY": "play",
+ "PLAY-RATE": "play-rate",
+ "START": "start",
+ "END": "end",
+ "IMPRESSION": "impression"
},
}
openapi_types = {
- '_from':
- (date,),
- 'dimension':
+ 'metric':
(str,),
+ '_from':
+ (datetime,),
'to':
- (date,),
- 'filter':
+ (datetime,),
+ 'interval':
+ (datetime,),
+ 'filter_by':
(str,),
'current_page':
(int,),
@@ -321,18 +513,20 @@ def get_videos_plays(
'_return_http_data_only': (bool,)
}
attribute_map = {
+ 'metric': 'metric',
'_from': 'from',
- 'dimension': 'dimension',
'to': 'to',
- 'filter': 'filter',
+ 'interval': 'interval',
+ 'filter_by': 'filterBy',
'current_page': 'currentPage',
'page_size': 'pageSize',
}
location_map = {
+ 'metric': 'path',
'_from': 'query',
- 'dimension': 'query',
'to': 'query',
- 'filter': 'query',
+ 'interval': 'query',
+ 'filter_by': 'query',
'current_page': 'query',
'page_size': 'query',
}
@@ -343,13 +537,13 @@ def get_videos_plays(
if key not in params_map['all']:
raise ApiTypeError(
"Got an unexpected parameter '%s'"
- " to method `get_videos_plays`" %
+ " to method `get_metrics_over_time`" %
(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 `get_videos_plays`" %
+ " when calling `get_metrics_over_time`" %
(key, )
)
@@ -357,13 +551,13 @@ def get_videos_plays(
if key not in kwargs.keys():
raise ApiValueError(
"Missing the required parameter `%s` when calling "
- "`get_videos_plays`" % (key, )
+ "`get_metrics_over_time`" % (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(
- "/analytics/videos/plays",
+ "/data/timeseries/{metric}",
"GET",
params['path'],
params['query'],
@@ -371,7 +565,7 @@ def get_videos_plays(
body=params['body'],
post_params=params['form'],
files=params['file'],
- response_type=(AnalyticsPlaysResponse,),
+ response_type=(AnalyticsMetricsOverTimeResponse,),
async_req=kwargs['async_req'],
_return_http_data_only=kwargs['_return_http_data_only'],
_preload_content=kwargs['_preload_content'],
diff --git a/apivideo/api_client.py b/apivideo/api_client.py
index e190b0a..f250158 100644
--- a/apivideo/api_client.py
+++ b/apivideo/api_client.py
@@ -773,10 +773,10 @@ def __call__(self, *args, **kwargs):
Example:
api_instance = AnalyticsApi()
- api_instance.get_live_streams_plays # this is an instance of the class Endpoint
- api_instance.get_live_streams_plays() # this invokes api_instance.get_live_streams_plays.__call__()
+ api_instance.get_aggregated_metrics # this is an instance of the class Endpoint
+ api_instance.get_aggregated_metrics() # this invokes api_instance.get_aggregated_metrics.__call__()
which then invokes the callable functions stored in that endpoint at
- api_instance.get_live_streams_plays.callable or self.callable in this class
+ api_instance.get_aggregated_metrics.callable or self.callable in this class
"""
return self.callable(self, *args, **kwargs)
diff --git a/apivideo/model/live_stream_session_device.py b/apivideo/model/analytics_aggregated_metrics_response.py
similarity index 88%
rename from apivideo/model/live_stream_session_device.py
rename to apivideo/model/analytics_aggregated_metrics_response.py
index 5abfcd5..f6340c1 100644
--- a/apivideo/model/live_stream_session_device.py
+++ b/apivideo/model/analytics_aggregated_metrics_response.py
@@ -25,8 +25,12 @@
validate_get_composed_info,
)
+def lazy_import():
+ from apivideo.model.analytics_aggregated_metrics_response_context import AnalyticsAggregatedMetricsResponseContext
+ globals()['AnalyticsAggregatedMetricsResponseContext'] = AnalyticsAggregatedMetricsResponseContext
-class LiveStreamSessionDevice(ModelNormal):
+
+class AnalyticsAggregatedMetricsResponse(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -70,10 +74,10 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
+ lazy_import()
return {
- 'type': (str,), # noqa: E501
- 'vendor': (str,), # noqa: E501
- 'model': (str,), # noqa: E501
+ 'context': (AnalyticsAggregatedMetricsResponseContext,), # noqa: E501
+ 'data': (float,), # noqa: E501
}
@cached_property
@@ -82,9 +86,8 @@ def discriminator():
attribute_map = {
- 'type': 'type', # noqa: E501
- 'vendor': 'vendor', # noqa: E501
- 'model': 'model', # noqa: E501
+ 'context': 'context', # noqa: E501
+ 'data': 'data', # noqa: E501
}
_composed_schemas = {}
@@ -99,8 +102,12 @@ def discriminator():
])
@convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """LiveStreamSessionDevice - a model defined in OpenAPI
+ def __init__(self, context, data, *args, **kwargs): # noqa: E501
+ """AnalyticsAggregatedMetricsResponse - a model defined in OpenAPI
+
+ Args:
+ context (AnalyticsAggregatedMetricsResponseContext):
+ data (float):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -133,9 +140,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- type (str): What the type is like desktop, laptop, mobile.. [optional] # noqa: E501
- vendor (str): If known, what the brand of the device is, like Apple, Dell, etc.. [optional] # noqa: E501
- model (str): The specific model of the device, if known.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -161,6 +165,8 @@ def __init__(self, *args, **kwargs): # noqa: E501
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.context = context
+ self.data = data
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
diff --git a/apivideo/model/video_session_referrer.py b/apivideo/model/analytics_aggregated_metrics_response_context.py
similarity index 81%
rename from apivideo/model/video_session_referrer.py
rename to apivideo/model/analytics_aggregated_metrics_response_context.py
index bbaaa3f..38e41e8 100644
--- a/apivideo/model/video_session_referrer.py
+++ b/apivideo/model/analytics_aggregated_metrics_response_context.py
@@ -25,8 +25,12 @@
validate_get_composed_info,
)
+def lazy_import():
+ from apivideo.model.analytics_aggregated_metrics_response_context_timeframe import AnalyticsAggregatedMetricsResponseContextTimeframe
+ globals()['AnalyticsAggregatedMetricsResponseContextTimeframe'] = AnalyticsAggregatedMetricsResponseContextTimeframe
-class VideoSessionReferrer(ModelNormal):
+
+class AnalyticsAggregatedMetricsResponseContext(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -51,6 +55,21 @@ class VideoSessionReferrer(ModelNormal):
"""
allowed_values = {
+ ('metric',): {
+ 'PLAY': "play",
+ 'START': "start",
+ 'END': "end",
+ 'IMPRESSION': "impression",
+ 'IMPRESSION-TIME': "impression-time",
+ 'WATCH-TIME': "watch-time",
+ },
+ ('aggregation',): {
+ 'COUNT': "count",
+ 'RATE': "rate",
+ 'TOTAL': "total",
+ 'AVERAGE': "average",
+ 'SUM': "sum",
+ },
}
validations = {
@@ -70,11 +89,11 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
+ lazy_import()
return {
- 'url': (str, none_type,), # noqa: E501
- 'medium': (str,), # noqa: E501
- 'source': (str,), # noqa: E501
- 'search_term': (str,), # noqa: E501
+ 'metric': (str,), # noqa: E501
+ 'aggregation': (str,), # noqa: E501
+ 'timeframe': (AnalyticsAggregatedMetricsResponseContextTimeframe,), # noqa: E501
}
@cached_property
@@ -83,10 +102,9 @@ def discriminator():
attribute_map = {
- 'url': 'url', # noqa: E501
- 'medium': 'medium', # noqa: E501
- 'source': 'source', # noqa: E501
- 'search_term': 'searchTerm', # noqa: E501
+ 'metric': 'metric', # noqa: E501
+ 'aggregation': 'aggregation', # noqa: E501
+ 'timeframe': 'timeframe', # noqa: E501
}
_composed_schemas = {}
@@ -102,7 +120,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """VideoSessionReferrer - a model defined in OpenAPI
+ """AnalyticsAggregatedMetricsResponseContext - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -135,10 +153,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- url (str, none_type): The link the viewer used to reach the video session.. [optional] # noqa: E501
- medium (str): How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement.. [optional] # noqa: E501
- source (str): The source the referrer came from to the video session. For example if they searched through google to find the stream.. [optional] # noqa: E501
- search_term (str): The search term they typed to arrive at the video session.. [optional] # noqa: E501
+ metric (str): Returns the metric you selected.. [optional] # noqa: E501
+ aggregation (str): Returns the aggregation you selected.. [optional] # noqa: E501
+ timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/video_session_location.py b/apivideo/model/analytics_aggregated_metrics_response_context_timeframe.py
similarity index 90%
rename from apivideo/model/video_session_location.py
rename to apivideo/model/analytics_aggregated_metrics_response_context_timeframe.py
index 3d7ba39..ce6627f 100644
--- a/apivideo/model/video_session_location.py
+++ b/apivideo/model/analytics_aggregated_metrics_response_context_timeframe.py
@@ -26,7 +26,7 @@
)
-class VideoSessionLocation(ModelNormal):
+class AnalyticsAggregatedMetricsResponseContextTimeframe(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -71,8 +71,8 @@ def openapi_types():
and the value is attribute type.
"""
return {
- 'country': (str,), # noqa: E501
- 'city': (str, none_type,), # noqa: E501
+ '_from': (datetime,), # noqa: E501
+ 'to': (datetime,), # noqa: E501
}
@cached_property
@@ -81,8 +81,8 @@ def discriminator():
attribute_map = {
- 'country': 'country', # noqa: E501
- 'city': 'city', # noqa: E501
+ '_from': 'from', # noqa: E501
+ 'to': 'to', # noqa: E501
}
_composed_schemas = {}
@@ -98,7 +98,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """VideoSessionLocation - a model defined in OpenAPI
+ """AnalyticsAggregatedMetricsResponseContextTimeframe - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -131,8 +131,8 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- country (str): The country of the viewer.. [optional] # noqa: E501
- city (str, none_type): The city of the viewer.. [optional] # noqa: E501
+ _from (datetime): Returns the starting date-time of the period you want analytics for in ATOM date-time format.. [optional] # noqa: E501
+ to (datetime): Returns the starting date-time of the period you want analytics for in ATOM date-time format.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/live_stream_session_session.py b/apivideo/model/analytics_metrics_breakdown_response.py
similarity index 81%
rename from apivideo/model/live_stream_session_session.py
rename to apivideo/model/analytics_metrics_breakdown_response.py
index 1fc6c4c..ec0b3d4 100644
--- a/apivideo/model/live_stream_session_session.py
+++ b/apivideo/model/analytics_metrics_breakdown_response.py
@@ -25,8 +25,16 @@
validate_get_composed_info,
)
+def lazy_import():
+ from apivideo.model.analytics_metrics_breakdown_response_context import AnalyticsMetricsBreakdownResponseContext
+ from apivideo.model.analytics_metrics_breakdown_response_data import AnalyticsMetricsBreakdownResponseData
+ from apivideo.model.pagination import Pagination
+ globals()['AnalyticsMetricsBreakdownResponseContext'] = AnalyticsMetricsBreakdownResponseContext
+ globals()['AnalyticsMetricsBreakdownResponseData'] = AnalyticsMetricsBreakdownResponseData
+ globals()['Pagination'] = Pagination
-class LiveStreamSessionSession(ModelNormal):
+
+class AnalyticsMetricsBreakdownResponse(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -70,10 +78,11 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
+ lazy_import()
return {
- 'session_id': (str,), # noqa: E501
- 'loaded_at': (datetime,), # noqa: E501
- 'ended_at': (datetime,), # noqa: E501
+ 'context': (AnalyticsMetricsBreakdownResponseContext,), # noqa: E501
+ 'data': ([AnalyticsMetricsBreakdownResponseData],), # noqa: E501
+ 'pagination': (Pagination,), # noqa: E501
}
@cached_property
@@ -82,9 +91,9 @@ def discriminator():
attribute_map = {
- 'session_id': 'sessionId', # noqa: E501
- 'loaded_at': 'loadedAt', # noqa: E501
- 'ended_at': 'endedAt', # noqa: E501
+ 'context': 'context', # noqa: E501
+ 'data': 'data', # noqa: E501
+ 'pagination': 'pagination', # noqa: E501
}
_composed_schemas = {}
@@ -99,8 +108,13 @@ def discriminator():
])
@convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """LiveStreamSessionSession - a model defined in OpenAPI
+ def __init__(self, context, data, pagination, *args, **kwargs): # noqa: E501
+ """AnalyticsMetricsBreakdownResponse - a model defined in OpenAPI
+
+ Args:
+ context (AnalyticsMetricsBreakdownResponseContext):
+ data ([AnalyticsMetricsBreakdownResponseData]): Returns an array of dimensions and their respective metrics.
+ pagination (Pagination):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -133,9 +147,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- session_id (str): A unique identifier for your session. You can use this to track what happens during a specific session.. [optional] # noqa: E501
- loaded_at (datetime): When the session started, with the date and time presented in ISO-8601 format.. [optional] # noqa: E501
- ended_at (datetime): When the session ended, with the date and time presented in ISO-8601 format.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -161,6 +172,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.context = context
+ self.data = data
+ self.pagination = pagination
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
diff --git a/apivideo/model/analytics_metrics_breakdown_response_context.py b/apivideo/model/analytics_metrics_breakdown_response_context.py
new file mode 100644
index 0000000..9e0954f
--- /dev/null
+++ b/apivideo/model/analytics_metrics_breakdown_response_context.py
@@ -0,0 +1,192 @@
+"""
+ 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.analytics_aggregated_metrics_response_context_timeframe import AnalyticsAggregatedMetricsResponseContextTimeframe
+ globals()['AnalyticsAggregatedMetricsResponseContextTimeframe'] = AnalyticsAggregatedMetricsResponseContextTimeframe
+
+
+class AnalyticsMetricsBreakdownResponseContext(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 = {
+ ('metric',): {
+ 'PLAY': "play",
+ 'PLAY-RATE': "play-rate",
+ 'START': "start",
+ 'END': "end",
+ 'IMPRESSION': "impression",
+ },
+ ('breakdown',): {
+ 'MEDIA-ID': "media-id",
+ 'MEDIA-TYPE': "media-type",
+ 'CONTINENT': "continent",
+ 'COUNTRY': "country",
+ 'DEVICE-TYPE': "device-type",
+ 'OPERATING-SYSTEM': "operating-system",
+ 'BROWSER': "browser",
+ },
+ }
+
+ 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 {
+ 'metric': (str,), # noqa: E501
+ 'breakdown': (str,), # noqa: E501
+ 'timeframe': (AnalyticsAggregatedMetricsResponseContextTimeframe,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'metric': 'metric', # noqa: E501
+ 'breakdown': 'breakdown', # noqa: E501
+ 'timeframe': 'timeframe', # 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
+ """AnalyticsMetricsBreakdownResponseContext - 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,)
+ metric (str): Returns the metric you selected.. [optional] # noqa: E501
+ breakdown (str): Returns the dimension you selected.. [optional] # noqa: E501
+ timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [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/video_session_client.py b/apivideo/model/analytics_metrics_breakdown_response_data.py
similarity index 89%
rename from apivideo/model/video_session_client.py
rename to apivideo/model/analytics_metrics_breakdown_response_data.py
index ad22401..bffb808 100644
--- a/apivideo/model/video_session_client.py
+++ b/apivideo/model/analytics_metrics_breakdown_response_data.py
@@ -26,7 +26,7 @@
)
-class VideoSessionClient(ModelNormal):
+class AnalyticsMetricsBreakdownResponseData(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -71,9 +71,8 @@ def openapi_types():
and the value is attribute type.
"""
return {
- 'name': (str,), # noqa: E501
- 'version': (str,), # noqa: E501
- 'type': (str,), # noqa: E501
+ 'dimension_value': (str,), # noqa: E501
+ 'metric_value': (float,), # noqa: E501
}
@cached_property
@@ -82,9 +81,8 @@ def discriminator():
attribute_map = {
- 'name': 'name', # noqa: E501
- 'version': 'version', # noqa: E501
- 'type': 'type', # noqa: E501
+ 'dimension_value': 'dimensionValue', # noqa: E501
+ 'metric_value': 'metricValue', # noqa: E501
}
_composed_schemas = {}
@@ -100,7 +98,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """VideoSessionClient - a model defined in OpenAPI
+ """AnalyticsMetricsBreakdownResponseData - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -133,9 +131,8 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- name (str): The name of the browser used to view the video session.. [optional] # noqa: E501
- version (str): The version of the browser used to view the video session.. [optional] # noqa: E501
- type (str): The type of client used to view the video session.. [optional] # noqa: E501
+ dimension_value (str): Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\".. [optional] # noqa: E501
+ metric_value (float): Returns the data for a specific dimension value.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/live_stream_session_referrer.py b/apivideo/model/analytics_metrics_over_time_response.py
similarity index 81%
rename from apivideo/model/live_stream_session_referrer.py
rename to apivideo/model/analytics_metrics_over_time_response.py
index 3f28517..a0c504f 100644
--- a/apivideo/model/live_stream_session_referrer.py
+++ b/apivideo/model/analytics_metrics_over_time_response.py
@@ -25,8 +25,16 @@
validate_get_composed_info,
)
+def lazy_import():
+ from apivideo.model.analytics_metrics_over_time_response_context import AnalyticsMetricsOverTimeResponseContext
+ from apivideo.model.analytics_metrics_over_time_response_data import AnalyticsMetricsOverTimeResponseData
+ from apivideo.model.pagination import Pagination
+ globals()['AnalyticsMetricsOverTimeResponseContext'] = AnalyticsMetricsOverTimeResponseContext
+ globals()['AnalyticsMetricsOverTimeResponseData'] = AnalyticsMetricsOverTimeResponseData
+ globals()['Pagination'] = Pagination
-class LiveStreamSessionReferrer(ModelNormal):
+
+class AnalyticsMetricsOverTimeResponse(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -70,11 +78,11 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
+ lazy_import()
return {
- 'url': (str,), # noqa: E501
- 'medium': (str,), # noqa: E501
- 'source': (str,), # noqa: E501
- 'search_term': (str,), # noqa: E501
+ 'context': (AnalyticsMetricsOverTimeResponseContext,), # noqa: E501
+ 'data': ([AnalyticsMetricsOverTimeResponseData],), # noqa: E501
+ 'pagination': (Pagination,), # noqa: E501
}
@cached_property
@@ -83,10 +91,9 @@ def discriminator():
attribute_map = {
- 'url': 'url', # noqa: E501
- 'medium': 'medium', # noqa: E501
- 'source': 'source', # noqa: E501
- 'search_term': 'searchTerm', # noqa: E501
+ 'context': 'context', # noqa: E501
+ 'data': 'data', # noqa: E501
+ 'pagination': 'pagination', # noqa: E501
}
_composed_schemas = {}
@@ -101,8 +108,13 @@ def discriminator():
])
@convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """LiveStreamSessionReferrer - a model defined in OpenAPI
+ def __init__(self, context, data, pagination, *args, **kwargs): # noqa: E501
+ """AnalyticsMetricsOverTimeResponse - a model defined in OpenAPI
+
+ Args:
+ context (AnalyticsMetricsOverTimeResponseContext):
+ data ([AnalyticsMetricsOverTimeResponseData]): Returns an array of metrics and the timestamps .
+ pagination (Pagination):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -135,10 +147,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- url (str): The website the viewer of the live stream was referred to in order to view the live stream.. [optional] # noqa: E501
- medium (str): The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement.. [optional] # noqa: E501
- source (str): Where the viewer came from to see the live stream (usually where they searched from).. [optional] # noqa: E501
- search_term (str): What term they searched for that led them to the live stream.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -164,6 +172,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.context = context
+ self.data = data
+ self.pagination = pagination
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
diff --git a/apivideo/model/video_session_session.py b/apivideo/model/analytics_metrics_over_time_response_context.py
similarity index 83%
rename from apivideo/model/video_session_session.py
rename to apivideo/model/analytics_metrics_over_time_response_context.py
index 468e814..fcac832 100644
--- a/apivideo/model/video_session_session.py
+++ b/apivideo/model/analytics_metrics_over_time_response_context.py
@@ -26,11 +26,11 @@
)
def lazy_import():
- from apivideo.model.metadata import Metadata
- globals()['Metadata'] = Metadata
+ from apivideo.model.analytics_aggregated_metrics_response_context_timeframe import AnalyticsAggregatedMetricsResponseContextTimeframe
+ globals()['AnalyticsAggregatedMetricsResponseContextTimeframe'] = AnalyticsAggregatedMetricsResponseContextTimeframe
-class VideoSessionSession(ModelNormal):
+class AnalyticsMetricsOverTimeResponseContext(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -55,6 +55,17 @@ class VideoSessionSession(ModelNormal):
"""
allowed_values = {
+ ('metric',): {
+ 'PLAY': "play",
+ 'PLAY-RATE': "play-rate",
+ 'START': "start",
+ 'END': "end",
+ 'IMPRESSION': "impression",
+ },
+ ('interval',): {
+ 'HOUR': "hour",
+ 'DAY': "day",
+ },
}
validations = {
@@ -76,10 +87,9 @@ def openapi_types():
"""
lazy_import()
return {
- 'session_id': (str,), # noqa: E501
- 'loaded_at': (datetime,), # noqa: E501
- 'ended_at': (datetime,), # noqa: E501
- 'metadata': ([Metadata],), # noqa: E501
+ 'metric': (str,), # noqa: E501
+ 'interval': (str,), # noqa: E501
+ 'timeframe': (AnalyticsAggregatedMetricsResponseContextTimeframe,), # noqa: E501
}
@cached_property
@@ -88,10 +98,9 @@ def discriminator():
attribute_map = {
- 'session_id': 'sessionId', # noqa: E501
- 'loaded_at': 'loadedAt', # noqa: E501
- 'ended_at': 'endedAt', # noqa: E501
- 'metadata': 'metadata', # noqa: E501
+ 'metric': 'metric', # noqa: E501
+ 'interval': 'interval', # noqa: E501
+ 'timeframe': 'timeframe', # noqa: E501
}
_composed_schemas = {}
@@ -107,7 +116,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """VideoSessionSession - a model defined in OpenAPI
+ """AnalyticsMetricsOverTimeResponseContext - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -140,10 +149,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- session_id (str): The unique identifier for the session that you can use to track what happens during it.. [optional] # noqa: E501
- loaded_at (datetime): When the video session started, presented in ISO-8601 format.. [optional] # noqa: E501
- ended_at (datetime): When the video session ended, presented in ISO-8601 format.. [optional] # noqa: E501
- metadata ([Metadata]): A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.. [optional] # noqa: E501
+ metric (str): Returns the metric you selected.. [optional] # noqa: E501
+ interval (str): Returns the interval you selected.. [optional] # noqa: E501
+ timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/live_stream_session_client.py b/apivideo/model/analytics_metrics_over_time_response_data.py
similarity index 89%
rename from apivideo/model/live_stream_session_client.py
rename to apivideo/model/analytics_metrics_over_time_response_data.py
index 1894db5..e9092cc 100644
--- a/apivideo/model/live_stream_session_client.py
+++ b/apivideo/model/analytics_metrics_over_time_response_data.py
@@ -26,7 +26,7 @@
)
-class LiveStreamSessionClient(ModelNormal):
+class AnalyticsMetricsOverTimeResponseData(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -71,9 +71,8 @@ def openapi_types():
and the value is attribute type.
"""
return {
- 'name': (str,), # noqa: E501
- 'version': (str,), # noqa: E501
- 'type': (str,), # noqa: E501
+ 'emitted_at': (str,), # noqa: E501
+ 'metric_value': (float,), # noqa: E501
}
@cached_property
@@ -82,9 +81,8 @@ def discriminator():
attribute_map = {
- 'name': 'name', # noqa: E501
- 'version': 'version', # noqa: E501
- 'type': 'type', # noqa: E501
+ 'emitted_at': 'emittedAt', # noqa: E501
+ 'metric_value': 'metricValue', # noqa: E501
}
_composed_schemas = {}
@@ -100,7 +98,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """LiveStreamSessionClient - a model defined in OpenAPI
+ """AnalyticsMetricsOverTimeResponseData - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -133,9 +131,8 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- name (str): The name of the browser used to view the live stream session.. [optional] # noqa: E501
- version (str): The version of the browser used to view the live stream session.. [optional] # noqa: E501
- type (str): The type of client used to view the live stream session.. [optional] # noqa: E501
+ emitted_at (str): Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined.. [optional] # noqa: E501
+ metric_value (float): Returns the data for a specific metric value.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/live_stream.py b/apivideo/model/live_stream.py
index a92b57c..73c34f1 100644
--- a/apivideo/model/live_stream.py
+++ b/apivideo/model/live_stream.py
@@ -125,7 +125,7 @@ def __init__(self, live_stream_id, restreams, *args, **kwargs): # noqa: E501
Args:
live_stream_id (str): The unique identifier for the live stream. Live stream IDs begin with \"li.\"
- restreams ([RestreamsResponseObject]): Returns the list of RTMP restream destinations.
+ restreams ([RestreamsResponseObject]): Returns the list of restream destinations.
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -160,7 +160,7 @@ def __init__(self, live_stream_id, restreams, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
name (str): The name of your live stream.. [optional] # noqa: E501
stream_key (str): The unique, private stream key that you use to begin streaming.. [optional] # noqa: E501
- public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).. [optional] # noqa: E501
+ public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).. [optional] # noqa: E501
assets (LiveStreamAssets): [optional] # noqa: E501
player_id (str): The unique identifier for the player.. [optional] # noqa: E501
broadcasting (bool): Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.. [optional] # noqa: E501
diff --git a/apivideo/model/live_stream_creation_payload.py b/apivideo/model/live_stream_creation_payload.py
index 168a001..468c0d7 100644
--- a/apivideo/model/live_stream_creation_payload.py
+++ b/apivideo/model/live_stream_creation_payload.py
@@ -146,9 +146,9 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).. [optional] # noqa: E501
+ public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).. [optional] # noqa: E501
player_id (str): The unique identifier for the player.. [optional] # noqa: E501
- restreams ([RestreamsRequestObject]): Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.. [optional] # noqa: E501
+ restreams ([RestreamsRequestObject]): Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/live_stream_session.py b/apivideo/model/live_stream_session.py
deleted file mode 100644
index a19145a..0000000
--- a/apivideo/model/live_stream_session.py
+++ /dev/null
@@ -1,195 +0,0 @@
-"""
- 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.live_stream_session_client import LiveStreamSessionClient
- from apivideo.model.live_stream_session_device import LiveStreamSessionDevice
- from apivideo.model.live_stream_session_location import LiveStreamSessionLocation
- from apivideo.model.live_stream_session_referrer import LiveStreamSessionReferrer
- from apivideo.model.live_stream_session_session import LiveStreamSessionSession
- from apivideo.model.video_session_os import VideoSessionOs
- globals()['LiveStreamSessionClient'] = LiveStreamSessionClient
- globals()['LiveStreamSessionDevice'] = LiveStreamSessionDevice
- globals()['LiveStreamSessionLocation'] = LiveStreamSessionLocation
- globals()['LiveStreamSessionReferrer'] = LiveStreamSessionReferrer
- globals()['LiveStreamSessionSession'] = LiveStreamSessionSession
- globals()['VideoSessionOs'] = VideoSessionOs
-
-
-class LiveStreamSession(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 {
- 'session': (LiveStreamSessionSession,), # noqa: E501
- 'location': (LiveStreamSessionLocation,), # noqa: E501
- 'referrer': (LiveStreamSessionReferrer,), # noqa: E501
- 'device': (LiveStreamSessionDevice,), # noqa: E501
- 'os': (VideoSessionOs,), # noqa: E501
- 'client': (LiveStreamSessionClient,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'session': 'session', # noqa: E501
- 'location': 'location', # noqa: E501
- 'referrer': 'referrer', # noqa: E501
- 'device': 'device', # noqa: E501
- 'os': 'os', # noqa: E501
- 'client': 'client', # 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
- """LiveStreamSession - 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,)
- session (LiveStreamSessionSession): [optional] # noqa: E501
- location (LiveStreamSessionLocation): [optional] # noqa: E501
- referrer (LiveStreamSessionReferrer): [optional] # noqa: E501
- device (LiveStreamSessionDevice): [optional] # noqa: E501
- os (VideoSessionOs): [optional] # noqa: E501
- client (LiveStreamSessionClient): [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/live_stream_session_location.py b/apivideo/model/live_stream_session_location.py
deleted file mode 100644
index a9914b9..0000000
--- a/apivideo/model/live_stream_session_location.py
+++ /dev/null
@@ -1,168 +0,0 @@
-"""
- 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 LiveStreamSessionLocation(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 {
- 'country': (str,), # noqa: E501
- 'city': (str,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'country': 'country', # noqa: E501
- 'city': 'city', # 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
- """LiveStreamSessionLocation - 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,)
- country (str): The country of the viewer of the live stream.. [optional] # noqa: E501
- city (str): The city of the viewer of the live stream.. [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/live_stream_update_payload.py b/apivideo/model/live_stream_update_payload.py
index 34076fb..1b0dea3 100644
--- a/apivideo/model/live_stream_update_payload.py
+++ b/apivideo/model/live_stream_update_payload.py
@@ -144,9 +144,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): The name you want to use for your live stream.. [optional] # noqa: E501
- public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).. [optional] # noqa: E501
+ public (bool): Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).. [optional] # noqa: E501
player_id (str): The unique ID for the player associated with a live stream that you want to update.. [optional] # noqa: E501
- restreams ([RestreamsRequestObject]): Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.. [optional] # noqa: E501
+ restreams ([RestreamsRequestObject]): Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/restreams_request_object.py b/apivideo/model/restreams_request_object.py
index b74d62e..d10c3a3 100644
--- a/apivideo/model/restreams_request_object.py
+++ b/apivideo/model/restreams_request_object.py
@@ -104,7 +104,7 @@ def __init__(self, name, server_url, stream_key, *args, **kwargs): # noqa: E501
Args:
name (str): Use this parameter to define a name for the restream destination.
- server_url (str): Use this parameter to set the RTMP URL of the restream destination.
+ server_url (str): Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination.
stream_key (str): Use this parameter to provide the unique key of the live stream that you want to restream.
Keyword Args:
diff --git a/apivideo/model/restreams_response_object.py b/apivideo/model/restreams_response_object.py
index eb1716a..5526b42 100644
--- a/apivideo/model/restreams_response_object.py
+++ b/apivideo/model/restreams_response_object.py
@@ -134,7 +134,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): Returns the name of a restream destination.. [optional] # noqa: E501
- server_url (str): Returns the RTMP URL of a restream destination.. [optional] # noqa: E501
+ server_url (str): Returns the server URL of a restream destination.. [optional] # noqa: E501
stream_key (str): Returns the unique key of the live stream that is set up for restreaming.. [optional] # noqa: E501
"""
diff --git a/apivideo/model/video_session_device.py b/apivideo/model/unrecognized_request_url.py
similarity index 91%
rename from apivideo/model/video_session_device.py
rename to apivideo/model/unrecognized_request_url.py
index 6865802..a7d4306 100644
--- a/apivideo/model/video_session_device.py
+++ b/apivideo/model/unrecognized_request_url.py
@@ -26,7 +26,7 @@
)
-class VideoSessionDevice(ModelNormal):
+class UnrecognizedRequestUrl(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -72,8 +72,8 @@ def openapi_types():
"""
return {
'type': (str,), # noqa: E501
- 'vendor': (str,), # noqa: E501
- 'model': (str,), # noqa: E501
+ 'title': (str,), # noqa: E501
+ 'status': (int,), # noqa: E501
}
@cached_property
@@ -83,8 +83,8 @@ def discriminator():
attribute_map = {
'type': 'type', # noqa: E501
- 'vendor': 'vendor', # noqa: E501
- 'model': 'model', # noqa: E501
+ 'title': 'title', # noqa: E501
+ 'status': 'status', # noqa: E501
}
_composed_schemas = {}
@@ -100,7 +100,7 @@ def discriminator():
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
- """VideoSessionDevice - a model defined in OpenAPI
+ """UnrecognizedRequestUrl - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -133,9 +133,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- type (str): What the type is like desktop, laptop, mobile.. [optional] # noqa: E501
- vendor (str): If known, what the brand of the device is, like Apple, Dell, etc.. [optional] # noqa: E501
- model (str): The specific model of the device, if known.. [optional] # noqa: E501
+ type (str): A link to the error documentation.. [optional] # noqa: E501
+ title (str): A description of the error that occurred.. [optional] # noqa: E501
+ status (int): The HTTP status code.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/apivideo/model/video_creation_payload.py b/apivideo/model/video_creation_payload.py
index 73356b4..e10582d 100644
--- a/apivideo/model/video_creation_payload.py
+++ b/apivideo/model/video_creation_payload.py
@@ -163,7 +163,7 @@ def __init__(self, title, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
description (str): A brief description of your video.. [optional] # noqa: E501
source (str): You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create.. [optional] # noqa: E501
- public (bool): Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). [optional] if omitted the server will use the default value of True # noqa: E501
+ public (bool): Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management). [optional] if omitted the server will use the default value of True # noqa: E501
panoramic (bool): Indicates if your video is a 360/immersive video.. [optional] if omitted the server will use the default value of False # noqa: E501
mp4_support (bool): Enables mp4 version in addition to streamed version.. [optional] if omitted the server will use the default value of True # noqa: E501
player_id (str): The unique identification number for your video player.. [optional] # noqa: E501
diff --git a/apivideo/model/video_session.py b/apivideo/model/video_session.py
deleted file mode 100644
index 65d4a4f..0000000
--- a/apivideo/model/video_session.py
+++ /dev/null
@@ -1,195 +0,0 @@
-"""
- 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.video_session_client import VideoSessionClient
- from apivideo.model.video_session_device import VideoSessionDevice
- from apivideo.model.video_session_location import VideoSessionLocation
- from apivideo.model.video_session_os import VideoSessionOs
- from apivideo.model.video_session_referrer import VideoSessionReferrer
- from apivideo.model.video_session_session import VideoSessionSession
- globals()['VideoSessionClient'] = VideoSessionClient
- globals()['VideoSessionDevice'] = VideoSessionDevice
- globals()['VideoSessionLocation'] = VideoSessionLocation
- globals()['VideoSessionOs'] = VideoSessionOs
- globals()['VideoSessionReferrer'] = VideoSessionReferrer
- globals()['VideoSessionSession'] = VideoSessionSession
-
-
-class VideoSession(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 {
- 'session': (VideoSessionSession,), # noqa: E501
- 'location': (VideoSessionLocation,), # noqa: E501
- 'referrer': (VideoSessionReferrer,), # noqa: E501
- 'device': (VideoSessionDevice,), # noqa: E501
- 'os': (VideoSessionOs,), # noqa: E501
- 'client': (VideoSessionClient,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'session': 'session', # noqa: E501
- 'location': 'location', # noqa: E501
- 'referrer': 'referrer', # noqa: E501
- 'device': 'device', # noqa: E501
- 'os': 'os', # noqa: E501
- 'client': 'client', # 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
- """VideoSession - 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,)
- session (VideoSessionSession): [optional] # noqa: E501
- location (VideoSessionLocation): [optional] # noqa: E501
- referrer (VideoSessionReferrer): [optional] # noqa: E501
- device (VideoSessionDevice): [optional] # noqa: E501
- os (VideoSessionOs): [optional] # noqa: E501
- client (VideoSessionClient): [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/video_session_os.py b/apivideo/model/video_session_os.py
deleted file mode 100644
index 4106f6d..0000000
--- a/apivideo/model/video_session_os.py
+++ /dev/null
@@ -1,171 +0,0 @@
-"""
- 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 VideoSessionOs(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 {
- 'name': (str,), # noqa: E501
- 'shortname': (str,), # noqa: E501
- 'version': (str,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'name': 'name', # noqa: E501
- 'shortname': 'shortname', # noqa: E501
- 'version': 'version', # 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
- """VideoSessionOs - 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,)
- name (str): The name of the operating system.. [optional] # noqa: E501
- shortname (str): The nickname for the operating system, often representing the version.. [optional] # noqa: E501
- version (str): The version of the operating system.. [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/VideoSessionLocation.md b/docs/AnalyticsAggregatedMetricsResponse.md
similarity index 59%
rename from docs/VideoSessionLocation.md
rename to docs/AnalyticsAggregatedMetricsResponse.md
index 11cceb1..0cc29bd 100644
--- a/docs/VideoSessionLocation.md
+++ b/docs/AnalyticsAggregatedMetricsResponse.md
@@ -1,11 +1,10 @@
-# VideoSessionLocation
+# AnalyticsAggregatedMetricsResponse
-The location of the viewer.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**country** | **str** | The country of the viewer. | [optional]
-**city** | **str, none_type** | The city of the viewer. | [optional]
+**context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | |
+**data** | **float** | |
[[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/AnalyticsAggregatedMetricsResponseContext.md b/docs/AnalyticsAggregatedMetricsResponseContext.md
new file mode 100644
index 0000000..98d5b54
--- /dev/null
+++ b/docs/AnalyticsAggregatedMetricsResponseContext.md
@@ -0,0 +1,12 @@
+# AnalyticsAggregatedMetricsResponseContext
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**metric** | **str** | Returns the metric you selected. | [optional]
+**aggregation** | **str** | Returns the aggregation you selected. | [optional]
+**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md
new file mode 100644
index 0000000..f639178
--- /dev/null
+++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md
@@ -0,0 +1,12 @@
+# AnalyticsAggregatedMetricsResponseContextTimeframe
+
+Returns the starting and ending date-times of the period you want analytics for.
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_from** | **datetime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional]
+**to** | **datetime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [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/AnalyticsApi.md b/docs/AnalyticsApi.md
index a5cd767..ba3e1a9 100644
--- a/docs/AnalyticsApi.md
+++ b/docs/AnalyticsApi.md
@@ -4,56 +4,135 @@ All URIs are relative to *https://ws.api.video*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**get_live_streams_plays**](AnalyticsApi.md#get_live_streams_plays) | **GET** /analytics/live-streams/plays | Get play events for live stream
-[**get_videos_plays**](AnalyticsApi.md#get_videos_plays) | **GET** /analytics/videos/plays | Get play events for video
+[**get_aggregated_metrics**](AnalyticsApi.md#get_aggregated_metrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics
+[**get_metrics_breakdown**](AnalyticsApi.md#get_metrics_breakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions
+[**get_metrics_over_time**](AnalyticsApi.md#get_metrics_over_time) | **GET** /data/timeseries/{metric} | Retrieve metrics over time
-# **get_live_streams_plays**
-> AnalyticsPlaysResponse get_live_streams_plays(_from, dimension)
+# **get_aggregated_metrics**
+> AnalyticsAggregatedMetricsResponse get_aggregated_metrics(metric, aggregation)
-Get play events for live stream
+Retrieve aggregated metrics
-Retrieve filtered analytics about the number of plays for your live streams in a project.
+Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time.
### Example
```python
import apivideo
from apivideo.api import analytics_api
-from apivideo.model.model403_error_schema import Model403ErrorSchema
from apivideo.model.too_many_requests import TooManyRequests
-from apivideo.model.analytics_plays_response import AnalyticsPlaysResponse
-from apivideo.model.not_found import NotFound
+from apivideo.model.unrecognized_request_url import UnrecognizedRequestUrl
from apivideo.model.analytics_plays400_error import AnalyticsPlays400Error
+from apivideo.model.analytics_aggregated_metrics_response import AnalyticsAggregatedMetricsResponse
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 = analytics_api.AnalyticsApi(api_client)
- _from = dateutil_parser('2023-06-01').date() # date | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format.
- dimension = "browser" # str | Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`.
- to = dateutil_parser('2023-06-10').date() # date | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional)
- filter = "liveStreamId:li3q7HxhApxRF1c8F8r6VeaI" # str | Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional)
+ metric = "play" # str | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric.
+ aggregation = "count" # str | Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric.
+ _from = dateutil_parser('2024-02-05T00:00:00+01:00') # datetime | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional)
+ to = dateutil_parser('2024-02-06T00:00:00+01:00') # datetime | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional)
+ filter_by = "filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox" # str | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Retrieve aggregated metrics
+ api_response = api_instance.get_aggregated_metrics(metric, aggregation)
+ pprint(api_response)
+ except apivideo.ApiException as e:
+ print("Exception when calling AnalyticsApi->get_aggregated_metrics: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # Retrieve aggregated metrics
+ api_response = api_instance.get_aggregated_metrics(metric, aggregation, _from=_from, to=to, filter_by=filter_by)
+ pprint(api_response)
+ except apivideo.ApiException as e:
+ print("Exception when calling AnalyticsApi->get_aggregated_metrics: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **metric** | **str**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. |
+ **aggregation** | **str**| Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. |
+ **_from** | **datetime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | [optional]
+ **to** | **datetime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional]
+ **filter_by** | **str**| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional]
+
+### Return type
+
+[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.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.
|
+**400** | Bad request error | * 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.
|
+**404** | Unrecognized request URL | * 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)
+
+# **get_metrics_breakdown**
+> AnalyticsMetricsBreakdownResponse get_metrics_breakdown(metric, breakdown)
+
+Retrieve metrics in a breakdown of dimensions
+
+Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type.
+
+### Example
+
+```python
+import apivideo
+from apivideo.api import analytics_api
+from apivideo.model.too_many_requests import TooManyRequests
+from apivideo.model.unrecognized_request_url import UnrecognizedRequestUrl
+from apivideo.model.analytics_metrics_breakdown_response import AnalyticsMetricsBreakdownResponse
+from apivideo.model.analytics_plays400_error import AnalyticsPlays400Error
+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 = analytics_api.AnalyticsApi(api_client)
+ metric = "play" # str | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback.
+ breakdown = "media-id" # str | Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`.
+ _from = dateutil_parser('2024-02-05T00:00:00+01:00') # datetime | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional)
+ to = dateutil_parser('2024-02-06T00:00:00+01:00') # datetime | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional)
+ filter_by = "filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox" # str | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (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
try:
- # Get play events for live stream
- api_response = api_instance.get_live_streams_plays(_from, dimension)
+ # Retrieve metrics in a breakdown of dimensions
+ api_response = api_instance.get_metrics_breakdown(metric, breakdown)
pprint(api_response)
except apivideo.ApiException as e:
- print("Exception when calling AnalyticsApi->get_live_streams_plays: %s\n" % e)
+ print("Exception when calling AnalyticsApi->get_metrics_breakdown: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
- # Get play events for live stream
- api_response = api_instance.get_live_streams_plays(_from, dimension, to=to, filter=filter, current_page=current_page, page_size=page_size)
+ # Retrieve metrics in a breakdown of dimensions
+ api_response = api_instance.get_metrics_breakdown(metric, breakdown, _from=_from, to=to, filter_by=filter_by, current_page=current_page, page_size=page_size)
pprint(api_response)
except apivideo.ApiException as e:
- print("Exception when calling AnalyticsApi->get_live_streams_plays: %s\n" % e)
+ print("Exception when calling AnalyticsApi->get_metrics_breakdown: %s\n" % e)
```
@@ -61,16 +140,17 @@ with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **_from** | **date**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. |
- **dimension** | **str**| Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. |
- **to** | **date**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional]
- **filter** | **str**| Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. | [optional]
+ **metric** | **str**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. |
+ **breakdown** | **str**| Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. |
+ **_from** | **datetime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional]
+ **to** | **datetime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional]
+ **filter_by** | **str**| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [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
-[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md)
+[**AnalyticsMetricsBreakdownResponse**](AnalyticsMetricsBreakdownResponse.md)
### HTTP request headers
@@ -84,28 +164,26 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**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.
|
**400** | Bad request error | * 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.
|
-**403** | Forbidden - Disabled Analytics | * 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.
|
-**404** | Not Found | * 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.
|
+**404** | Unrecognized request URL | * 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)
-# **get_videos_plays**
-> AnalyticsPlaysResponse get_videos_plays(_from, dimension)
+# **get_metrics_over_time**
+> AnalyticsMetricsOverTimeResponse get_metrics_over_time(metric)
-Get play events for video
+Retrieve metrics over time
-Retrieve filtered analytics about the number of plays for your videos in a project.
+Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred
### Example
```python
import apivideo
from apivideo.api import analytics_api
-from apivideo.model.model403_error_schema import Model403ErrorSchema
from apivideo.model.too_many_requests import TooManyRequests
-from apivideo.model.analytics_plays_response import AnalyticsPlaysResponse
-from apivideo.model.not_found import NotFound
+from apivideo.model.unrecognized_request_url import UnrecognizedRequestUrl
+from apivideo.model.analytics_metrics_over_time_response import AnalyticsMetricsOverTimeResponse
from apivideo.model.analytics_plays400_error import AnalyticsPlays400Error
from pprint import pprint
@@ -113,29 +191,30 @@ from pprint import pprint
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
# Create an instance of the API class
api_instance = analytics_api.AnalyticsApi(api_client)
- _from = dateutil_parser('2023-06-01').date() # date | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format.
- dimension = "browser" # str | Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`.
- to = dateutil_parser('2023-06-10').date() # date | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional)
- filter = "videoId:vi3q7HxhApxRF1c8F8r6VeaI" # str | Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional)
+ metric = "play" # str | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback.
+ _from = dateutil_parser('from=2024-02-05T00:00:00+01:00') # datetime | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional)
+ to = dateutil_parser('to=2024-02-06T00:00:00+01:00') # datetime | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional)
+ interval = dateutil_parser('to=2024-02-06T00:00:00+01:00') # datetime | Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional)
+ filter_by = "filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox" # str | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (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
try:
- # Get play events for video
- api_response = api_instance.get_videos_plays(_from, dimension)
+ # Retrieve metrics over time
+ api_response = api_instance.get_metrics_over_time(metric)
pprint(api_response)
except apivideo.ApiException as e:
- print("Exception when calling AnalyticsApi->get_videos_plays: %s\n" % e)
+ print("Exception when calling AnalyticsApi->get_metrics_over_time: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
- # Get play events for video
- api_response = api_instance.get_videos_plays(_from, dimension, to=to, filter=filter, current_page=current_page, page_size=page_size)
+ # Retrieve metrics over time
+ api_response = api_instance.get_metrics_over_time(metric, _from=_from, to=to, interval=interval, filter_by=filter_by, current_page=current_page, page_size=page_size)
pprint(api_response)
except apivideo.ApiException as e:
- print("Exception when calling AnalyticsApi->get_videos_plays: %s\n" % e)
+ print("Exception when calling AnalyticsApi->get_metrics_over_time: %s\n" % e)
```
@@ -143,16 +222,17 @@ with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **_from** | **date**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. |
- **dimension** | **str**| Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. |
- **to** | **date**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional]
- **filter** | **str**| Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. | [optional]
+ **metric** | **str**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. |
+ **_from** | **datetime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional]
+ **to** | **datetime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional]
+ **interval** | **datetime**| Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional]
+ **filter_by** | **str**| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [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
-[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md)
+[**AnalyticsMetricsOverTimeResponse**](AnalyticsMetricsOverTimeResponse.md)
### HTTP request headers
@@ -166,8 +246,7 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**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.
|
**400** | Bad request error | * 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.
|
-**403** | Forbidden - Disabled Analytics | * 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.
|
-**404** | Not Found | * 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.
|
+**404** | Unrecognized request URL | * 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/AnalyticsMetricsBreakdownResponse.md b/docs/AnalyticsMetricsBreakdownResponse.md
new file mode 100644
index 0000000..61de32d
--- /dev/null
+++ b/docs/AnalyticsMetricsBreakdownResponse.md
@@ -0,0 +1,12 @@
+# AnalyticsMetricsBreakdownResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | |
+**data** | [**[AnalyticsMetricsBreakdownResponseData]**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. |
+**pagination** | [**Pagination**](Pagination.md) | |
+
+[[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/AnalyticsMetricsBreakdownResponseContext.md b/docs/AnalyticsMetricsBreakdownResponseContext.md
new file mode 100644
index 0000000..88856f0
--- /dev/null
+++ b/docs/AnalyticsMetricsBreakdownResponseContext.md
@@ -0,0 +1,12 @@
+# AnalyticsMetricsBreakdownResponseContext
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**metric** | **str** | Returns the metric you selected. | [optional]
+**breakdown** | **str** | Returns the dimension you selected. | [optional]
+**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsMetricsBreakdownResponseData.md b/docs/AnalyticsMetricsBreakdownResponseData.md
new file mode 100644
index 0000000..2b8a536
--- /dev/null
+++ b/docs/AnalyticsMetricsBreakdownResponseData.md
@@ -0,0 +1,11 @@
+# AnalyticsMetricsBreakdownResponseData
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**dimension_value** | **str** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional]
+**metric_value** | **float** | Returns the data for a specific dimension value. | [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/AnalyticsMetricsOverTimeResponse.md b/docs/AnalyticsMetricsOverTimeResponse.md
new file mode 100644
index 0000000..7394403
--- /dev/null
+++ b/docs/AnalyticsMetricsOverTimeResponse.md
@@ -0,0 +1,12 @@
+# AnalyticsMetricsOverTimeResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | |
+**data** | [**[AnalyticsMetricsOverTimeResponseData]**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . |
+**pagination** | [**Pagination**](Pagination.md) | |
+
+[[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/AnalyticsMetricsOverTimeResponseContext.md b/docs/AnalyticsMetricsOverTimeResponseContext.md
new file mode 100644
index 0000000..22f3ad5
--- /dev/null
+++ b/docs/AnalyticsMetricsOverTimeResponseContext.md
@@ -0,0 +1,12 @@
+# AnalyticsMetricsOverTimeResponseContext
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**metric** | **str** | Returns the metric you selected. | [optional]
+**interval** | **str** | Returns the interval you selected. | [optional]
+**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsMetricsOverTimeResponseData.md b/docs/AnalyticsMetricsOverTimeResponseData.md
new file mode 100644
index 0000000..510c95d
--- /dev/null
+++ b/docs/AnalyticsMetricsOverTimeResponseData.md
@@ -0,0 +1,11 @@
+# AnalyticsMetricsOverTimeResponseData
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**emitted_at** | **str** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional]
+**metric_value** | **float** | Returns the data for a specific metric value. | [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/LiveStream.md b/docs/LiveStream.md
index 9969601..974c4b5 100644
--- a/docs/LiveStream.md
+++ b/docs/LiveStream.md
@@ -4,10 +4,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**live_stream_id** | **str** | The unique identifier for the live stream. Live stream IDs begin with \"li.\" |
-**restreams** | [**[RestreamsResponseObject]**](RestreamsResponseObject.md) | Returns the list of RTMP restream destinations. |
+**restreams** | [**[RestreamsResponseObject]**](RestreamsResponseObject.md) | Returns the list of restream destinations. |
**name** | **str** | The name of your live stream. | [optional]
**stream_key** | **str** | The unique, private stream key that you use to begin streaming. | [optional]
-**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional]
+**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional]
**assets** | [**LiveStreamAssets**](LiveStreamAssets.md) | | [optional]
**player_id** | **str** | The unique identifier for the player. | [optional]
**broadcasting** | **bool** | Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. | [optional]
diff --git a/docs/LiveStreamCreationPayload.md b/docs/LiveStreamCreationPayload.md
index ce03eb3..1510e62 100644
--- a/docs/LiveStreamCreationPayload.md
+++ b/docs/LiveStreamCreationPayload.md
@@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Add a name for your live stream here. |
-**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional]
+**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional]
**player_id** | **str** | The unique identifier for the player. | [optional]
-**restreams** | [**[RestreamsRequestObject]**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional]
+**restreams** | [**[RestreamsRequestObject]**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. | [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/LiveStreamSession.md b/docs/LiveStreamSession.md
deleted file mode 100644
index 59a3c3b..0000000
--- a/docs/LiveStreamSession.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# LiveStreamSession
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**session** | [**LiveStreamSessionSession**](LiveStreamSessionSession.md) | | [optional]
-**location** | [**LiveStreamSessionLocation**](LiveStreamSessionLocation.md) | | [optional]
-**referrer** | [**LiveStreamSessionReferrer**](LiveStreamSessionReferrer.md) | | [optional]
-**device** | [**LiveStreamSessionDevice**](LiveStreamSessionDevice.md) | | [optional]
-**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional]
-**client** | [**LiveStreamSessionClient**](LiveStreamSessionClient.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/LiveStreamSessionClient.md b/docs/LiveStreamSessionClient.md
deleted file mode 100644
index be7cdcf..0000000
--- a/docs/LiveStreamSessionClient.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# LiveStreamSessionClient
-
-What kind of browser the viewer is using for the live stream session.
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **str** | The name of the browser used to view the live stream session. | [optional]
-**version** | **str** | The version of the browser used to view the live stream session. | [optional]
-**type** | **str** | The type of client used to view the live stream session. | [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/LiveStreamSessionDevice.md b/docs/LiveStreamSessionDevice.md
deleted file mode 100644
index ead0457..0000000
--- a/docs/LiveStreamSessionDevice.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# LiveStreamSessionDevice
-
-What type of device the user is on when in the live stream session.
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**type** | **str** | What the type is like desktop, laptop, mobile. | [optional]
-**vendor** | **str** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional]
-**model** | **str** | The specific model of the device, if known. | [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/LiveStreamSessionReferrer.md b/docs/LiveStreamSessionReferrer.md
deleted file mode 100644
index 72329bb..0000000
--- a/docs/LiveStreamSessionReferrer.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# LiveStreamSessionReferrer
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**url** | **str** | The website the viewer of the live stream was referred to in order to view the live stream. | [optional]
-**medium** | **str** | The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. | [optional]
-**source** | **str** | Where the viewer came from to see the live stream (usually where they searched from). | [optional]
-**search_term** | **str** | What term they searched for that led them to the live stream. | [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/LiveStreamSessionSession.md b/docs/LiveStreamSessionSession.md
deleted file mode 100644
index 8061bdf..0000000
--- a/docs/LiveStreamSessionSession.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# LiveStreamSessionSession
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**session_id** | **str** | A unique identifier for your session. You can use this to track what happens during a specific session. | [optional]
-**loaded_at** | **datetime** | When the session started, with the date and time presented in ISO-8601 format. | [optional]
-**ended_at** | **datetime** | When the session ended, with the date and time presented in ISO-8601 format. | [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/LiveStreamUpdatePayload.md b/docs/LiveStreamUpdatePayload.md
index 4d3680d..bd61e5e 100644
--- a/docs/LiveStreamUpdatePayload.md
+++ b/docs/LiveStreamUpdatePayload.md
@@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | The name you want to use for your live stream. | [optional]
-**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional]
+**public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional]
**player_id** | **str** | The unique ID for the player associated with a live stream that you want to update. | [optional]
-**restreams** | [**[RestreamsRequestObject]**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional]
+**restreams** | [**[RestreamsRequestObject]**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [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/LiveStreamsApi.md b/docs/LiveStreamsApi.md
index 5679f9d..4d0ef59 100644
--- a/docs/LiveStreamsApi.md
+++ b/docs/LiveStreamsApi.md
@@ -41,7 +41,7 @@ with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
player_id="pl4f4ferf5erfr5zed4fsdd",
restreams=[
RestreamsRequestObject(
- name="My RTMP server",
+ name="My restream server",
server_url="rtmp://my.broadcast.example.com/app",
stream_key="dw-dew8-q6w9-k67w-1ws8",
),
@@ -170,7 +170,7 @@ with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
player_id="pl45KFKdlddgk654dspkze",
restreams=[
RestreamsRequestObject(
- name="My RTMP server",
+ name="My restream server",
server_url="rtmp://my.broadcast.example.com/app",
stream_key="dw-dew8-q6w9-k67w-1ws8",
),
diff --git a/docs/RestreamsRequestObject.md b/docs/RestreamsRequestObject.md
index 14ae436..740598a 100644
--- a/docs/RestreamsRequestObject.md
+++ b/docs/RestreamsRequestObject.md
@@ -5,7 +5,7 @@ Adding restream destinations is optional. However, if you set a restream destina
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Use this parameter to define a name for the restream destination. |
-**server_url** | **str** | Use this parameter to set the RTMP URL of the restream destination. |
+**server_url** | **str** | Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. |
**stream_key** | **str** | Use this parameter to provide the unique key of the live stream that you want to restream. |
[[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/RestreamsResponseObject.md b/docs/RestreamsResponseObject.md
index d67cfa4..0d2fc9b 100644
--- a/docs/RestreamsResponseObject.md
+++ b/docs/RestreamsResponseObject.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Returns the name of a restream destination. | [optional]
-**server_url** | **str** | Returns the RTMP URL of a restream destination. | [optional]
+**server_url** | **str** | Returns the server URL of a restream destination. | [optional]
**stream_key** | **str** | Returns the unique key of the live stream that is set up for restreaming. | [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/LiveStreamSessionLocation.md b/docs/UnrecognizedRequestUrl.md
similarity index 56%
rename from docs/LiveStreamSessionLocation.md
rename to docs/UnrecognizedRequestUrl.md
index e811e0f..ca010cc 100644
--- a/docs/LiveStreamSessionLocation.md
+++ b/docs/UnrecognizedRequestUrl.md
@@ -1,11 +1,11 @@
-# LiveStreamSessionLocation
+# UnrecognizedRequestUrl
-The location of the viewer of the live stream.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**country** | **str** | The country of the viewer of the live stream. | [optional]
-**city** | **str** | The city of the viewer of the live stream. | [optional]
+**type** | **str** | A link to the error documentation. | [optional]
+**title** | **str** | A description of the error that occurred. | [optional]
+**status** | **int** | The HTTP status code. | [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/VideoCreationPayload.md b/docs/VideoCreationPayload.md
index efaf4cf..13bd05b 100644
--- a/docs/VideoCreationPayload.md
+++ b/docs/VideoCreationPayload.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
**title** | **str** | The title of your new video. |
**description** | **str** | A brief description of your video. | [optional]
**source** | **str** | You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create. | [optional]
-**public** | **bool** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) | [optional] if omitted the server will use the default value of True
+**public** | **bool** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) | [optional] if omitted the server will use the default value of True
**panoramic** | **bool** | Indicates if your video is a 360/immersive video. | [optional] if omitted the server will use the default value of False
**mp4_support** | **bool** | Enables mp4 version in addition to streamed version. | [optional] if omitted the server will use the default value of True
**player_id** | **str** | The unique identification number for your video player. | [optional]
diff --git a/docs/VideoSession.md b/docs/VideoSession.md
deleted file mode 100644
index 7964c36..0000000
--- a/docs/VideoSession.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# VideoSession
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**session** | [**VideoSessionSession**](VideoSessionSession.md) | | [optional]
-**location** | [**VideoSessionLocation**](VideoSessionLocation.md) | | [optional]
-**referrer** | [**VideoSessionReferrer**](VideoSessionReferrer.md) | | [optional]
-**device** | [**VideoSessionDevice**](VideoSessionDevice.md) | | [optional]
-**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional]
-**client** | [**VideoSessionClient**](VideoSessionClient.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/VideoSessionClient.md b/docs/VideoSessionClient.md
deleted file mode 100644
index 4b8c095..0000000
--- a/docs/VideoSessionClient.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# VideoSessionClient
-
-What kind of browser the viewer is using for the video session.
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **str** | The name of the browser used to view the video session. | [optional]
-**version** | **str** | The version of the browser used to view the video session. | [optional]
-**type** | **str** | The type of client used to view the video session. | [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/VideoSessionDevice.md b/docs/VideoSessionDevice.md
deleted file mode 100644
index f40a88a..0000000
--- a/docs/VideoSessionDevice.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# VideoSessionDevice
-
-What type of device the user is on when in the video session.
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**type** | **str** | What the type is like desktop, laptop, mobile. | [optional]
-**vendor** | **str** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional]
-**model** | **str** | The specific model of the device, if known. | [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/VideoSessionOs.md b/docs/VideoSessionOs.md
deleted file mode 100644
index f704393..0000000
--- a/docs/VideoSessionOs.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# VideoSessionOs
-
-The operating system the viewer is on.
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **str** | The name of the operating system. | [optional]
-**shortname** | **str** | The nickname for the operating system, often representing the version. | [optional]
-**version** | **str** | The version of the operating system. | [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/VideoSessionReferrer.md b/docs/VideoSessionReferrer.md
deleted file mode 100644
index 2a4db95..0000000
--- a/docs/VideoSessionReferrer.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# VideoSessionReferrer
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**url** | **str, none_type** | The link the viewer used to reach the video session. | [optional]
-**medium** | **str** | How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. | [optional]
-**source** | **str** | The source the referrer came from to the video session. For example if they searched through google to find the stream. | [optional]
-**search_term** | **str** | The search term they typed to arrive at the video session. | [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/VideoSessionSession.md b/docs/VideoSessionSession.md
deleted file mode 100644
index 9d40891..0000000
--- a/docs/VideoSessionSession.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# VideoSessionSession
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**session_id** | **str** | The unique identifier for the session that you can use to track what happens during it. | [optional]
-**loaded_at** | **datetime** | When the video session started, presented in ISO-8601 format. | [optional]
-**ended_at** | **datetime** | When the video session ended, presented in ISO-8601 format. | [optional]
-**metadata** | [**[Metadata]**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [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/test/payloads/analytics/get_aggregated_metrics/responses/200.json b/test/payloads/analytics/get_aggregated_metrics/responses/200.json
new file mode 100644
index 0000000..aad4f98
--- /dev/null
+++ b/test/payloads/analytics/get_aggregated_metrics/responses/200.json
@@ -0,0 +1,11 @@
+{
+ "context" : {
+ "metric" : "impression",
+ "aggregation" : "count",
+ "timeframe" : {
+ "from" : "2024-05-28T11:15:07+00:00",
+ "to" : "2024-05-29T11:15:07+00:00"
+ }
+ },
+ "data" : 346.5
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-0.json b/test/payloads/analytics/get_aggregated_metrics/responses/400-0.json
similarity index 88%
rename from test/payloads/analytics/get_live_streams_plays/responses/400-0.json
rename to test/payloads/analytics/get_aggregated_metrics/responses/400-0.json
index 84db8c3..4cbfb11 100644
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-0.json
+++ b/test/payloads/analytics/get_aggregated_metrics/responses/400-0.json
@@ -3,5 +3,5 @@
"title" : "An attribute is invalid.",
"status" : 400,
"detail" : "This value must be of type string.",
- "name" : "dimension"
+ "name" : "metric"
}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-5.json b/test/payloads/analytics/get_aggregated_metrics/responses/400-1.json
similarity index 61%
rename from test/payloads/analytics/get_videos_plays/responses/400-5.json
rename to test/payloads/analytics/get_aggregated_metrics/responses/400-1.json
index 080db28..061e505 100644
--- a/test/payloads/analytics/get_videos_plays/responses/400-5.json
+++ b/test/payloads/analytics/get_aggregated_metrics/responses/400-1.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/request-invalid-query-parameter",
"title" : "A query parameter is invalid.",
"status" : 400,
- "detail" : "This value must refer to an existing video",
- "name" : "filter"
+ "detail" : "This field was not expected.",
+ "name" : "from:2024-05-20T09:15:05+02:00"
}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_aggregated_metrics/responses/404.json b/test/payloads/analytics/get_aggregated_metrics/responses/404.json
new file mode 100644
index 0000000..a1ef71d
--- /dev/null
+++ b/test/payloads/analytics/get_aggregated_metrics/responses/404.json
@@ -0,0 +1,5 @@
+{
+ "type" : "https://docs.api.video/reference/unrecognized-request-url",
+ "title" : "Unrecognized request URL.",
+ "status" : 404
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/429.json b/test/payloads/analytics/get_aggregated_metrics/responses/429.json
similarity index 100%
rename from test/payloads/analytics/get_live_streams_plays/responses/429.json
rename to test/payloads/analytics/get_aggregated_metrics/responses/429.json
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/200-0.json b/test/payloads/analytics/get_live_streams_plays/responses/200-0.json
deleted file mode 100644
index 833d2ff..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/200-0.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "data" : [ {
- "value" : "li3q7HxhApxRF1c8F8r6VeaI",
- "plays" : 100
- }, {
- "value" : "li3q7HxhApxRF1c8F8r6VeaB",
- "plays" : 10
- }, {
- "value" : "li3q7HxhApxRF1c8F8r6VeaD",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 2,
- "pageSize" : 2,
- "pagesTotal" : 2,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=1&pageSize=2"
- }, {
- "rel" : "first",
- "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1"
- }, {
- "rel" : "last",
- "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/200-1.json b/test/payloads/analytics/get_live_streams_plays/responses/200-1.json
deleted file mode 100644
index cf2e9e5..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/200-1.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "data" : [ {
- "value" : "france",
- "plays" : 100
- }, {
- "value" : "united states",
- "plays" : 10
- }, {
- "value" : "spain",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 2,
- "pageSize" : 2,
- "pagesTotal" : 2,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2"
- }, {
- "rel" : "first",
- "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2"
- }, {
- "rel" : "last",
- "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=2&pageSize=1"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/200-2.json b/test/payloads/analytics/get_live_streams_plays/responses/200-2.json
deleted file mode 100644
index 4e08c61..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/200-2.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "data" : [ {
- "value" : "2023-06-10T10:00:00.000Z",
- "plays" : 100
- }, {
- "value" : "2023-06-10T11:00:00.000Z",
- "plays" : 10
- }, {
- "value" : "2023-06-10T12:00:00.000Z",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 3,
- "pageSize" : 25,
- "pagesTotal" : 1,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- }, {
- "rel" : "first",
- "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- }, {
- "rel" : "last",
- "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-1.json b/test/payloads/analytics/get_live_streams_plays/responses/400-1.json
deleted file mode 100644
index eaf7c78..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-1.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}",
- "name" : "filter"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-2.json b/test/payloads/analytics/get_live_streams_plays/responses/400-2.json
deleted file mode 100644
index 282264f..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-2.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser",
- "name" : "dimension"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-3.json b/test/payloads/analytics/get_live_streams_plays/responses/400-3.json
deleted file mode 100644
index 282264f..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-3.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser",
- "name" : "dimension"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-4.json b/test/payloads/analytics/get_live_streams_plays/responses/400-4.json
deleted file mode 100644
index eaf7c78..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-4.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}",
- "name" : "filter"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/403.json b/test/payloads/analytics/get_live_streams_plays/responses/403.json
deleted file mode 100644
index cdd0425..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/403.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/authorization-disabled-analytics",
- "title" : "You cannot get analytics from this project.",
- "status" : 403
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/404.json b/test/payloads/analytics/get_live_streams_plays/responses/404.json
deleted file mode 100644
index f366b6f..0000000
--- a/test/payloads/analytics/get_live_streams_plays/responses/404.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "status" : 404
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_metrics_breakdown/responses/200.json b/test/payloads/analytics/get_metrics_breakdown/responses/200.json
new file mode 100644
index 0000000..f5cdba3
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_breakdown/responses/200.json
@@ -0,0 +1,31 @@
+{
+ "context" : {
+ "metric" : "play",
+ "breakdown" : "country",
+ "timeframe" : {
+ "from" : "2024-04-28T07:15:05+00:00",
+ "to" : "2024-05-29T11:25:37+00:00"
+ }
+ },
+ "data" : [ {
+ "metricValue" : 7,
+ "dimensionValue" : "FR"
+ } ],
+ "pagination" : {
+ "currentPage" : 1,
+ "currentPageItems" : 1,
+ "pageSize" : 25,
+ "pagesTotal" : 1,
+ "itemsTotal" : 1,
+ "links" : [ {
+ "rel" : "self",
+ "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25"
+ }, {
+ "rel" : "first",
+ "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25"
+ }, {
+ "rel" : "last",
+ "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25"
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-0.json b/test/payloads/analytics/get_metrics_breakdown/responses/400-0.json
similarity index 88%
rename from test/payloads/analytics/get_videos_plays/responses/400-0.json
rename to test/payloads/analytics/get_metrics_breakdown/responses/400-0.json
index 84db8c3..4cbfb11 100644
--- a/test/payloads/analytics/get_videos_plays/responses/400-0.json
+++ b/test/payloads/analytics/get_metrics_breakdown/responses/400-0.json
@@ -3,5 +3,5 @@
"title" : "An attribute is invalid.",
"status" : 400,
"detail" : "This value must be of type string.",
- "name" : "dimension"
+ "name" : "metric"
}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_live_streams_plays/responses/400-5.json b/test/payloads/analytics/get_metrics_breakdown/responses/400-1.json
similarity index 61%
rename from test/payloads/analytics/get_live_streams_plays/responses/400-5.json
rename to test/payloads/analytics/get_metrics_breakdown/responses/400-1.json
index 95b2f61..061e505 100644
--- a/test/payloads/analytics/get_live_streams_plays/responses/400-5.json
+++ b/test/payloads/analytics/get_metrics_breakdown/responses/400-1.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/request-invalid-query-parameter",
"title" : "A query parameter is invalid.",
"status" : 400,
- "detail" : "This value must refer to an existing live stream",
- "name" : "filter"
+ "detail" : "This field was not expected.",
+ "name" : "from:2024-05-20T09:15:05+02:00"
}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_metrics_breakdown/responses/404.json b/test/payloads/analytics/get_metrics_breakdown/responses/404.json
new file mode 100644
index 0000000..a1ef71d
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_breakdown/responses/404.json
@@ -0,0 +1,5 @@
+{
+ "type" : "https://docs.api.video/reference/unrecognized-request-url",
+ "title" : "Unrecognized request URL.",
+ "status" : 404
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/429.json b/test/payloads/analytics/get_metrics_breakdown/responses/429.json
similarity index 100%
rename from test/payloads/analytics/get_videos_plays/responses/429.json
rename to test/payloads/analytics/get_metrics_breakdown/responses/429.json
diff --git a/test/payloads/analytics/get_metrics_over_time/responses/200.json b/test/payloads/analytics/get_metrics_over_time/responses/200.json
new file mode 100644
index 0000000..b5a6342
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_over_time/responses/200.json
@@ -0,0 +1,37 @@
+{
+ "context" : {
+ "metric" : "play",
+ "interval" : "hour",
+ "timeframe" : {
+ "from" : "2024-05-28T11:08:39+00:00",
+ "to" : "2024-05-29T11:08:39+00:00"
+ }
+ },
+ "data" : [ {
+ "emittedAt" : "2024-05-29T07:00:00+00:00",
+ "metricValue" : 2
+ }, {
+ "emittedAt" : "2024-05-29T08:00:00+00:00",
+ "metricValue" : 1
+ }, {
+ "emittedAt" : "2024-05-29T09:00:00+00:00",
+ "metricValue" : 1
+ } ],
+ "pagination" : {
+ "currentPage" : 1,
+ "currentPageItems" : 3,
+ "pageSize" : 25,
+ "pagesTotal" : 1,
+ "itemsTotal" : 3,
+ "links" : [ {
+ "rel" : "self",
+ "uri" : "/data/timeseries/play?currentPage=1&pageSize=25"
+ }, {
+ "rel" : "first",
+ "uri" : "/data/timeseries/play?currentPage=1&pageSize=25"
+ }, {
+ "rel" : "last",
+ "uri" : "/data/timeseries/play?currentPage=1&pageSize=25"
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_metrics_over_time/responses/400-0.json b/test/payloads/analytics/get_metrics_over_time/responses/400-0.json
new file mode 100644
index 0000000..4cbfb11
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_over_time/responses/400-0.json
@@ -0,0 +1,7 @@
+{
+ "type" : "https://docs.api.video/reference/invalid-attribute",
+ "title" : "An attribute is invalid.",
+ "status" : 400,
+ "detail" : "This value must be of type string.",
+ "name" : "metric"
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-1.json b/test/payloads/analytics/get_metrics_over_time/responses/400-1.json
similarity index 58%
rename from test/payloads/analytics/get_videos_plays/responses/400-1.json
rename to test/payloads/analytics/get_metrics_over_time/responses/400-1.json
index b1044e2..061e505 100644
--- a/test/payloads/analytics/get_videos_plays/responses/400-1.json
+++ b/test/payloads/analytics/get_metrics_over_time/responses/400-1.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/request-invalid-query-parameter",
"title" : "A query parameter is invalid.",
"status" : 400,
- "detail" : "This value must be of the following structure(s): videoId:{videoId}",
- "name" : "filter"
+ "detail" : "This field was not expected.",
+ "name" : "from:2024-05-20T09:15:05+02:00"
}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_metrics_over_time/responses/404.json b/test/payloads/analytics/get_metrics_over_time/responses/404.json
new file mode 100644
index 0000000..a1ef71d
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_over_time/responses/404.json
@@ -0,0 +1,5 @@
+{
+ "type" : "https://docs.api.video/reference/unrecognized-request-url",
+ "title" : "Unrecognized request URL.",
+ "status" : 404
+}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_metrics_over_time/responses/429.json b/test/payloads/analytics/get_metrics_over_time/responses/429.json
new file mode 100644
index 0000000..d312e2b
--- /dev/null
+++ b/test/payloads/analytics/get_metrics_over_time/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/payloads/analytics/get_videos_plays/responses/200-0.json b/test/payloads/analytics/get_videos_plays/responses/200-0.json
deleted file mode 100644
index f0d1e9a..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/200-0.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "data" : [ {
- "value" : "vi3q7HxhApxRF1c8F8r6VeaI",
- "plays" : 100
- }, {
- "value" : "vi3q7HxhApxRF1c8F8r6VeaF",
- "plays" : 10
- }, {
- "value" : "vi3q7HxhApxRF1c8F8r6VeaH",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 3,
- "pageSize" : 25,
- "pagesTotal" : 1,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25"
- }, {
- "rel" : "first",
- "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25"
- }, {
- "rel" : "last",
- "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/200-1.json b/test/payloads/analytics/get_videos_plays/responses/200-1.json
deleted file mode 100644
index 7348fe2..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/200-1.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "data" : [ {
- "value" : "france",
- "plays" : 100
- }, {
- "value" : "united states",
- "plays" : 10
- }, {
- "value" : "spain",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 2,
- "pageSize" : 2,
- "pagesTotal" : 2,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2"
- }, {
- "rel" : "first",
- "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2"
- }, {
- "rel" : "next",
- "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1"
- }, {
- "rel" : "last",
- "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/200-2.json b/test/payloads/analytics/get_videos_plays/responses/200-2.json
deleted file mode 100644
index ae770da..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/200-2.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "data" : [ {
- "value" : "2023-06-10T10:00:00.000Z",
- "plays" : 100
- }, {
- "value" : "2023-06-10T11:00:00.000Z",
- "plays" : 10
- }, {
- "value" : "2023-06-10T12:00:00.000Z",
- "plays" : 1
- } ],
- "pagination" : {
- "currentPage" : 1,
- "currentPageItems" : 3,
- "pageSize" : 25,
- "pagesTotal" : 1,
- "itemsTotal" : 3,
- "links" : [ {
- "rel" : "self",
- "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- }, {
- "rel" : "first",
- "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- }, {
- "rel" : "last",
- "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25"
- } ]
- }
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-2.json b/test/payloads/analytics/get_videos_plays/responses/400-2.json
deleted file mode 100644
index 3f739e6..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/400-2.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser",
- "name" : "dimension"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-3.json b/test/payloads/analytics/get_videos_plays/responses/400-3.json
deleted file mode 100644
index 3f739e6..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/400-3.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser",
- "name" : "dimension"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/400-4.json b/test/payloads/analytics/get_videos_plays/responses/400-4.json
deleted file mode 100644
index b1044e2..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/400-4.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/request-invalid-query-parameter",
- "title" : "A query parameter is invalid.",
- "status" : 400,
- "detail" : "This value must be of the following structure(s): videoId:{videoId}",
- "name" : "filter"
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/403.json b/test/payloads/analytics/get_videos_plays/responses/403.json
deleted file mode 100644
index cdd0425..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/403.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "type" : "https://docs.api.video/reference/authorization-disabled-analytics",
- "title" : "You cannot get analytics from this project.",
- "status" : 403
-}
\ No newline at end of file
diff --git a/test/payloads/analytics/get_videos_plays/responses/404.json b/test/payloads/analytics/get_videos_plays/responses/404.json
deleted file mode 100644
index f366b6f..0000000
--- a/test/payloads/analytics/get_videos_plays/responses/404.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "status" : 404
-}
\ No newline at end of file
diff --git a/test/payloads/live_streams/create/responses/400-1.json b/test/payloads/live_streams/create/responses/400-1.json
index 1350192..c3d6d42 100644
--- a/test/payloads/live_streams/create/responses/400-1.json
+++ b/test/payloads/live_streams/create/responses/400-1.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "An attribute is invalid.",
"status" : 400,
- "detail" : "Missing app name: rtmp://[host]/[app name].",
+ "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].",
"name" : "restreams[0][serverUrl]"
}
\ No newline at end of file
diff --git a/test/payloads/live_streams/create/responses/400-2.json b/test/payloads/live_streams/create/responses/400-2.json
index b05a8e3..ea329ab 100644
--- a/test/payloads/live_streams/create/responses/400-2.json
+++ b/test/payloads/live_streams/create/responses/400-2.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "An attribute is invalid.",
"status" : 400,
- "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].",
+ "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].",
"name" : "restreams[0][serverUrl]"
}
\ No newline at end of file
diff --git a/test/payloads/live_streams/delete_thumbnail/responses/404.json b/test/payloads/live_streams/delete_thumbnail/responses/404.json
index 9efa63b..87595d9 100644
--- a/test/payloads/live_streams/delete_thumbnail/responses/404.json
+++ b/test/payloads/live_streams/delete_thumbnail/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "liveStreamId",
"status" : 404
diff --git a/test/payloads/live_streams/update/responses/400-1.json b/test/payloads/live_streams/update/responses/400-1.json
index 1350192..c3d6d42 100644
--- a/test/payloads/live_streams/update/responses/400-1.json
+++ b/test/payloads/live_streams/update/responses/400-1.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "An attribute is invalid.",
"status" : 400,
- "detail" : "Missing app name: rtmp://[host]/[app name].",
+ "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].",
"name" : "restreams[0][serverUrl]"
}
\ No newline at end of file
diff --git a/test/payloads/live_streams/update/responses/400-2.json b/test/payloads/live_streams/update/responses/400-2.json
index b05a8e3..ea329ab 100644
--- a/test/payloads/live_streams/update/responses/400-2.json
+++ b/test/payloads/live_streams/update/responses/400-2.json
@@ -2,6 +2,6 @@
"type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "An attribute is invalid.",
"status" : 400,
- "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].",
+ "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].",
"name" : "restreams[0][serverUrl]"
}
\ No newline at end of file
diff --git a/test/payloads/live_streams/upload_thumbnail/responses/400.json b/test/payloads/live_streams/upload_thumbnail/responses/400.json
index 631e001..b581e38 100644
--- a/test/payloads/live_streams/upload_thumbnail/responses/400.json
+++ b/test/payloads/live_streams/upload_thumbnail/responses/400.json
@@ -1,6 +1,6 @@
{
"status" : 400,
- "type" : "https://docs.api.video/docs/fileextension",
+ "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid",
"title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.",
"name" : "file"
}
\ No newline at end of file
diff --git a/test/payloads/live_streams/upload_thumbnail/responses/404.json b/test/payloads/live_streams/upload_thumbnail/responses/404.json
index 9efa63b..87595d9 100644
--- a/test/payloads/live_streams/upload_thumbnail/responses/404.json
+++ b/test/payloads/live_streams/upload_thumbnail/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "liveStreamId",
"status" : 404
diff --git a/test/payloads/player_themes/delete/responses/404.json b/test/payloads/player_themes/delete/responses/404.json
index 719c18c..30decf6 100644
--- a/test/payloads/player_themes/delete/responses/404.json
+++ b/test/payloads/player_themes/delete/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "playerId",
"status" : 404
diff --git a/test/payloads/player_themes/delete_logo/responses/404.json b/test/payloads/player_themes/delete_logo/responses/404.json
index 719c18c..30decf6 100644
--- a/test/payloads/player_themes/delete_logo/responses/404.json
+++ b/test/payloads/player_themes/delete_logo/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "playerId",
"status" : 404
diff --git a/test/payloads/player_themes/get/responses/404.json b/test/payloads/player_themes/get/responses/404.json
index 719c18c..30decf6 100644
--- a/test/payloads/player_themes/get/responses/404.json
+++ b/test/payloads/player_themes/get/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "playerId",
"status" : 404
diff --git a/test/payloads/player_themes/update/responses/404.json b/test/payloads/player_themes/update/responses/404.json
index 719c18c..30decf6 100644
--- a/test/payloads/player_themes/update/responses/404.json
+++ b/test/payloads/player_themes/update/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "playerId",
"status" : 404
diff --git a/test/payloads/player_themes/upload_logo/responses/400.json b/test/payloads/player_themes/upload_logo/responses/400.json
index a96e225..6ef950a 100644
--- a/test/payloads/player_themes/upload_logo/responses/400.json
+++ b/test/payloads/player_themes/upload_logo/responses/400.json
@@ -1,6 +1,6 @@
{
"status" : 400,
- "type" : "https://docs.api.video/docs/fileextension",
+ "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid",
"title" : "Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported.",
"name" : "file"
}
\ No newline at end of file
diff --git a/test/payloads/player_themes/upload_logo/responses/404.json b/test/payloads/player_themes/upload_logo/responses/404.json
index 719c18c..30decf6 100644
--- a/test/payloads/player_themes/upload_logo/responses/404.json
+++ b/test/payloads/player_themes/upload_logo/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "playerId",
"status" : 404
diff --git a/test/payloads/videos/create/responses/400.json b/test/payloads/videos/create/responses/400.json
index fc789fc..c6358bf 100644
--- a/test/payloads/videos/create/responses/400.json
+++ b/test/payloads/videos/create/responses/400.json
@@ -1,22 +1,22 @@
{
- "type" : "https://docs.api.video/docs/attributerequired",
+ "type" : "https://docs.api.video/reference/attribute-required",
"title" : "This attribute is required.",
"name" : "title",
"status" : 400,
"problems" : [ {
- "type" : "https://docs.api.video/docs/attributerequired",
+ "type" : "https://docs.api.video/reference/attribute-required",
"title" : "This attribute is required.",
"name" : "title"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be a ISO8601 date.",
"name" : "scheduledAt"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be an array.",
"name" : "tags"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be an array.",
"name" : "metadata"
} ]
diff --git a/test/payloads/videos/delete/responses/404.json b/test/payloads/videos/delete/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/delete/responses/404.json
+++ b/test/payloads/videos/delete/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/get/responses/404.json b/test/payloads/videos/get/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/get/responses/404.json
+++ b/test/payloads/videos/get/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/get_status/responses/404.json b/test/payloads/videos/get_status/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/get_status/responses/404.json
+++ b/test/payloads/videos/get_status/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/pick_thumbnail/responses/404.json b/test/payloads/videos/pick_thumbnail/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/pick_thumbnail/responses/404.json
+++ b/test/payloads/videos/pick_thumbnail/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/update/responses/400.json b/test/payloads/videos/update/responses/400.json
index 65910b5..9115c98 100644
--- a/test/payloads/videos/update/responses/400.json
+++ b/test/payloads/videos/update/responses/400.json
@@ -1,18 +1,18 @@
{
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be a ISO-8601 date.",
"name" : "scheduledAt",
"status" : 400,
"problems" : [ {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be a ISO-8601 date.",
"name" : "scheduledAt"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be an array.",
"name" : "tags"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be an array.",
"name" : "metadata"
} ]
diff --git a/test/payloads/videos/update/responses/404.json b/test/payloads/videos/update/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/update/responses/404.json
+++ b/test/payloads/videos/update/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/upload/responses/400.json b/test/payloads/videos/upload/responses/400.json
index b90e95e..09d2579 100644
--- a/test/payloads/videos/upload/responses/400.json
+++ b/test/payloads/videos/upload/responses/400.json
@@ -1,22 +1,22 @@
{
- "type" : "https://docs.api.video/docs/filealreadyuploaded",
+ "type" : "https://docs.api.video/reference/video-source-already-uploaded",
"title" : "The source of the video is already uploaded.",
"name" : "file",
"status" : 400,
"problems" : [ {
- "type" : "https://docs.api.video/docs/filealreadyuploaded",
+ "type" : "https://docs.api.video/reference/video-source-already-uploaded",
"title" : "The source of the video is already uploaded.",
"name" : "file"
}, {
- "type" : "https://docs.api.video/docs/filealreadyuploaded",
+ "type" : "https://docs.api.video/reference/video-source-already-uploaded",
"title" : "The video xxxx has already been uploaded.",
"name" : "video"
}, {
- "type" : "https://docs.api.video/docs/filemissing",
+ "type" : "https://docs.api.video/reference/uploaded-file-no-file",
"title" : "There is no uploaded file in the request.",
"name" : "file"
}, {
- "type" : "https://docs.api.video/docs/multiplefilesuploaded",
+ "type" : "https://docs.api.video/reference/uploaded-file-multiple-files",
"title" : "There is more than one uploaded file in the request.",
"name" : "file"
} ]
diff --git a/test/payloads/videos/upload/responses/404.json b/test/payloads/videos/upload/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/upload/responses/404.json
+++ b/test/payloads/videos/upload/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/videos/upload_thumbnail/responses/400.json b/test/payloads/videos/upload_thumbnail/responses/400.json
index 631e001..b581e38 100644
--- a/test/payloads/videos/upload_thumbnail/responses/400.json
+++ b/test/payloads/videos/upload_thumbnail/responses/400.json
@@ -1,6 +1,6 @@
{
"status" : 400,
- "type" : "https://docs.api.video/docs/fileextension",
+ "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid",
"title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.",
"name" : "file"
}
\ No newline at end of file
diff --git a/test/payloads/videos/upload_thumbnail/responses/404.json b/test/payloads/videos/upload_thumbnail/responses/404.json
index 69b4332..27275e1 100644
--- a/test/payloads/videos/upload_thumbnail/responses/404.json
+++ b/test/payloads/videos/upload_thumbnail/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "videoId",
"status" : 404
diff --git a/test/payloads/watermarks/delete/responses/404.json b/test/payloads/watermarks/delete/responses/404.json
index 4ca04c5..c31a9d8 100644
--- a/test/payloads/watermarks/delete/responses/404.json
+++ b/test/payloads/watermarks/delete/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "watermarkId",
"status" : 404
diff --git a/test/payloads/watermarks/upload/responses/400.json b/test/payloads/watermarks/upload/responses/400.json
index 7d5c846..3b406ad 100644
--- a/test/payloads/watermarks/upload/responses/400.json
+++ b/test/payloads/watermarks/upload/responses/400.json
@@ -1,6 +1,6 @@
{
"status" : 400,
- "type" : "https://docs.api.video/docs/fileextension",
+ "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid",
"title" : "Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.",
"name" : "file"
}
\ No newline at end of file
diff --git a/test/payloads/webhooks/create/responses/400.json b/test/payloads/webhooks/create/responses/400.json
index 1878cc2..e7c9e89 100644
--- a/test/payloads/webhooks/create/responses/400.json
+++ b/test/payloads/webhooks/create/responses/400.json
@@ -1,18 +1,18 @@
{
- "type" : "https://docs.api.video/docs/attributerequired",
+ "type" : "https://docs.api.video/reference/attribute-required",
"events" : "This attribute is required.",
"name" : "events",
"status" : 400,
"problems" : [ {
- "type" : "https://docs.api.video/docs/attributerequired",
+ "type" : "https://docs.api.video/reference/attribute-required",
"title" : "This attribute is required.",
"name" : "events"
}, {
- "type" : "https://docs.api.video/docs/attributerequired",
+ "type" : "https://docs.api.video/reference/attribute-required",
"title" : "This attribute is required.",
"name" : "url"
}, {
- "type" : "https://docs.api.video/docs/attributeinvalid",
+ "type" : "https://docs.api.video/reference/invalid-attribute",
"title" : "This attribute must be an array.",
"name" : "events"
} ]
diff --git a/test/payloads/webhooks/delete/responses/404.json b/test/payloads/webhooks/delete/responses/404.json
index 0721bb1..c97ea66 100644
--- a/test/payloads/webhooks/delete/responses/404.json
+++ b/test/payloads/webhooks/delete/responses/404.json
@@ -1,5 +1,5 @@
{
- "type" : "https://docs.api.video/docs/resourcenot_found",
+ "type" : "https://docs.api.video/reference/resource-not-found",
"title" : "The requested resource was not found.",
"name" : "webhookId",
"status" : 404
diff --git a/test/test_analytics_api.py b/test/test_analytics_api.py
index a9e49b1..3c04ade 100644
--- a/test/test_analytics_api.py
+++ b/test/test_analytics_api.py
@@ -16,11 +16,12 @@
from apivideo.model.video_watermark import VideoWatermark
from apivideo.model.restreams_request_object import RestreamsRequestObject
+from apivideo.model.analytics_aggregated_metrics_response import AnalyticsAggregatedMetricsResponse
+from apivideo.model.analytics_metrics_breakdown_response import AnalyticsMetricsBreakdownResponse
+from apivideo.model.analytics_metrics_over_time_response import AnalyticsMetricsOverTimeResponse
from apivideo.model.analytics_plays400_error import AnalyticsPlays400Error
-from apivideo.model.analytics_plays_response import AnalyticsPlaysResponse
-from apivideo.model.model403_error_schema import Model403ErrorSchema
-from apivideo.model.not_found import NotFound
from apivideo.model.too_many_requests import TooManyRequests
+from apivideo.model.unrecognized_request_url import UnrecognizedRequestUrl
from helper import MainTest
@@ -36,54 +37,79 @@ def setUp(self):
self.api = AnalyticsApi(self.client) # noqa: E501
@responses.activate
- def test_get_live_streams_plays(self):
- """Test case for get_live_streams_plays
+ def test_get_aggregated_metrics(self):
+ """Test case for get_aggregated_metrics
- Get play events for live stream # noqa: E501
+ Retrieve aggregated metrics # noqa: E501
"""
- for file_name, json in self.load_json('analytics', 'get_live_streams_plays'):
+ for file_name, json in self.load_json('analytics', 'get_aggregated_metrics'):
status = file_name.split("-")[0]
responses.reset()
kwargs = {
- '_from': dateutil_parser('2023-06-01').date(),
- 'dimension': "browser",
+ 'metric': "play",
+ 'aggregation': "count",
}
- url = '/analytics/live-streams/plays'.format(**kwargs)
+ url = '/data/metrics/{metric}/{aggregation}'.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.get_live_streams_plays(**kwargs)
+ self.api.get_aggregated_metrics(**kwargs)
if status == '404':
self.assertIsInstance(context.exception, NotFoundException)
else:
- self.api.get_live_streams_plays(**kwargs)
+ self.api.get_aggregated_metrics(**kwargs)
@responses.activate
- def test_get_videos_plays(self):
- """Test case for get_videos_plays
+ def test_get_metrics_breakdown(self):
+ """Test case for get_metrics_breakdown
- Get play events for video # noqa: E501
+ Retrieve metrics in a breakdown of dimensions # noqa: E501
"""
- for file_name, json in self.load_json('analytics', 'get_videos_plays'):
+ for file_name, json in self.load_json('analytics', 'get_metrics_breakdown'):
status = file_name.split("-")[0]
responses.reset()
kwargs = {
- '_from': dateutil_parser('2023-06-01').date(),
- 'dimension': "browser",
+ 'metric': "play",
+ 'breakdown': "media-id",
}
- url = '/analytics/videos/plays'.format(**kwargs)
+ url = '/data/buckets/{metric}/{breakdown}'.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.get_videos_plays(**kwargs)
+ self.api.get_metrics_breakdown(**kwargs)
if status == '404':
self.assertIsInstance(context.exception, NotFoundException)
else:
- self.api.get_videos_plays(**kwargs)
+ self.api.get_metrics_breakdown(**kwargs)
+
+ @responses.activate
+ def test_get_metrics_over_time(self):
+ """Test case for get_metrics_over_time
+
+ Retrieve metrics over time # noqa: E501
+ """
+ for file_name, json in self.load_json('analytics', 'get_metrics_over_time'):
+ status = file_name.split("-")[0]
+ responses.reset()
+
+ kwargs = {
+ 'metric': "play",
+ }
+ url = '/data/timeseries/{metric}'.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.get_metrics_over_time(**kwargs)
+ if status == '404':
+ self.assertIsInstance(context.exception, NotFoundException)
+ else:
+ self.api.get_metrics_over_time(**kwargs)
diff --git a/test/test_live_streams_api.py b/test/test_live_streams_api.py
index 1c4d811..7125c68 100644
--- a/test/test_live_streams_api.py
+++ b/test/test_live_streams_api.py
@@ -54,7 +54,7 @@ def test_create(self):
player_id="pl4f4ferf5erfr5zed4fsdd",
restreams=[
RestreamsRequestObject(
- name="My RTMP server",
+ name="My restream server",
server_url="rtmp://my.broadcast.example.com/app",
stream_key="dw-dew8-q6w9-k67w-1ws8",
),
@@ -116,7 +116,7 @@ def test_update(self):
player_id="pl45KFKdlddgk654dspkze",
restreams=[
RestreamsRequestObject(
- name="My RTMP server",
+ name="My restream server",
server_url="rtmp://my.broadcast.example.com/app",
stream_key="dw-dew8-q6w9-k67w-1ws8",
),