Skip to content

Commit

Permalink
Merge pull request #104 from apivideo/analytics-updates
Browse files Browse the repository at this point in the history
Analytics updates
  • Loading branch information
bot-api-video authored Nov 6, 2024
2 parents c87598e + 9cc3736 commit f7a60d6
Show file tree
Hide file tree
Showing 29 changed files with 243 additions and 47 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.4.6] - 2024-11-04
- Analytics updates (ccv, views, ...)

## [1.4.5] - 2024-10-21
- Add summary feature

Expand Down
2 changes: 1 addition & 1 deletion apivideo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""


__version__ = "1.4.5"
__version__ = "1.4.6"

# import ApiVideoClient
from apivideo.auth_api_client import AuthenticatedApiClient
Expand Down
100 changes: 86 additions & 14 deletions apivideo/api/analytics_api.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apivideo/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie

self.default_headers['AV-Origin-Client'] = "python:1.4.5"
self.default_headers['AV-Origin-Client'] = "python:1.4.6"

def __enter__(self):
return self
Expand Down
2 changes: 1 addition & 1 deletion apivideo/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1\n"\
"SDK Package Version: 1.4.5".\
"SDK Package Version: 1.4.6".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
13 changes: 12 additions & 1 deletion apivideo/model/analytics_aggregated_metrics_response_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ class AnalyticsAggregatedMetricsResponseContext(ModelNormal):
'IMPRESSION': "impression",
'IMPRESSION-TIME': "impression-time",
'WATCH-TIME': "watch-time",
'CCV': "ccv",
'UNIQUE-CCV': "unique-ccv",
'VIEW-3': "view-3",
'VIEW-5': "view-5",
'VIEW-10': "view-10",
'VIEW-30': "view-30",
'UNIQUE-VIEW': "unique-view",
'UNIQUE-VIEW-3': "unique-view-3",
'UNIQUE-VIEW-5': "unique-view-5",
'UNIQUE-VIEW-10': "unique-view-10",
'UNIQUE-VIEW-30': "unique-view-30",
},
('aggregation',): {
'COUNT': "count",
Expand Down Expand Up @@ -153,7 +164,7 @@ 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,)
metric (str): Returns the metric you selected.. [optional] # noqa: E501
metric (str): Returns the metric and relevant parameters you selected.. [optional] # noqa: E501
aggregation (str): Returns the aggregation you selected.. [optional] # noqa: E501
timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [optional] # noqa: E501
"""
Expand Down
15 changes: 14 additions & 1 deletion apivideo/model/analytics_metrics_breakdown_response_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ class AnalyticsMetricsBreakdownResponseContext(ModelNormal):
'START': "start",
'END': "end",
'IMPRESSION': "impression",
'CCV-AVERAGE': "ccv-average",
'CCV-PEAK': "ccv-peak",
'UNIQUE-CCV-AVERAGE': "unique-ccv-average",
'UNIQUE-CCV-PEAK': "unique-ccv-peak",
'VIEW-3': "view-3",
'VIEW-5': "view-5",
'VIEW-10': "view-10",
'VIEW-30': "view-30",
'UNIQUE-VIEW': "unique-view",
'UNIQUE-VIEW-3': "unique-view-3",
'UNIQUE-VIEW-5': "unique-view-5",
'UNIQUE-VIEW-10': "unique-view-10",
'UNIQUE-VIEW-30': "unique-view-30",
},
('breakdown',): {
'MEDIA-ID': "media-id",
Expand Down Expand Up @@ -154,7 +167,7 @@ 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,)
metric (str): Returns the metric you selected.. [optional] # noqa: E501
metric (str): Returns the metric and relevant parameters you selected.. [optional] # noqa: E501
breakdown (str): Returns the dimension you selected.. [optional] # noqa: E501
timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [optional] # noqa: E501
"""
Expand Down
2 changes: 1 addition & 1 deletion apivideo/model/analytics_metrics_over_time_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self, context, data, pagination, *args, **kwargs): # noqa: E501
Args:
context (AnalyticsMetricsOverTimeResponseContext):
data ([AnalyticsMetricsOverTimeResponseData]): Returns an array of metrics and the timestamps .
data ([AnalyticsMetricsOverTimeResponseData]): Returns an array of metrics and the timestamps.
pagination (Pagination):
Keyword Args:
Expand Down
16 changes: 15 additions & 1 deletion apivideo/model/analytics_metrics_over_time_response_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,22 @@ class AnalyticsMetricsOverTimeResponseContext(ModelNormal):
'START': "start",
'END': "end",
'IMPRESSION': "impression",
'CCV-AVERAGE': "ccv-average",
'CCV-PEAK': "ccv-peak",
'UNIQUE-CCV-AVERAGE': "unique-ccv-average",
'UNIQUE-CCV-PEAK': "unique-ccv-peak",
'VIEW-3': "view-3",
'VIEW-5': "view-5",
'VIEW-10': "view-10",
'VIEW-30': "view-30",
'UNIQUE-VIEW': "unique-view",
'UNIQUE-VIEW-3': "unique-view-3",
'UNIQUE-VIEW-5': "unique-view-5",
'UNIQUE-VIEW-10': "unique-view-10",
'UNIQUE-VIEW-30': "unique-view-30",
},
('interval',): {
'MINUTE': "minute",
'HOUR': "hour",
'DAY': "day",
},
Expand Down Expand Up @@ -149,7 +163,7 @@ 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,)
metric (str): Returns the metric you selected.. [optional] # noqa: E501
metric (str): Returns the metric and relevant parameters you selected.. [optional] # noqa: E501
interval (str): Returns the interval you selected.. [optional] # noqa: E501
timeframe (AnalyticsAggregatedMetricsResponseContextTimeframe): [optional] # noqa: E501
"""
Expand Down
3 changes: 3 additions & 0 deletions apivideo/model/filter_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def openapi_types():
'operating_system': ([str],), # noqa: E501
'browser': ([str],), # noqa: E501
'tag': (str,), # noqa: E501
'referrer': ([str],), # noqa: E501
}

@cached_property
Expand All @@ -108,6 +109,7 @@ def discriminator():
'operating_system': 'operatingSystem', # noqa: E501
'browser': 'browser', # noqa: E501
'tag': 'tag', # noqa: E501
'referrer': 'referrer', # noqa: E501
}

_composed_schemas = {}
Expand Down Expand Up @@ -164,6 +166,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
operating_system ([str]): Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.. [optional] # noqa: E501
browser ([str]): Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.. [optional] # noqa: E501
tag (str): Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).. [optional] # noqa: E501
referrer ([str]): Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. - The API filters for exact matches. Include the trailing `/` characters if needed. - The URLs you add must be URL encoded.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
3 changes: 3 additions & 0 deletions apivideo/model/filter_by1.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def openapi_types():
'operating_system': ([str],), # noqa: E501
'browser': ([str],), # noqa: E501
'tag': (str,), # noqa: E501
'referrer': ([str],), # noqa: E501
}

@cached_property
Expand All @@ -108,6 +109,7 @@ def discriminator():
'operating_system': 'operatingSystem', # noqa: E501
'browser': 'browser', # noqa: E501
'tag': 'tag', # noqa: E501
'referrer': 'referrer', # noqa: E501
}

_composed_schemas = {}
Expand Down Expand Up @@ -164,6 +166,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
operating_system ([str]): Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.. [optional] # noqa: E501
browser ([str]): Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.. [optional] # noqa: E501
tag (str): Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).. [optional] # noqa: E501
referrer ([str]): Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. - The API filters for exact matches. Include the trailing `/` characters if needed. - The URLs you add must be URL encoded.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
3 changes: 3 additions & 0 deletions apivideo/model/filter_by2.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def openapi_types():
'operating_system': ([str],), # noqa: E501
'browser': ([str],), # noqa: E501
'tag': (str,), # noqa: E501
'referrer': ([str],), # noqa: E501
}

@cached_property
Expand All @@ -108,6 +109,7 @@ def discriminator():
'operating_system': 'operatingSystem', # noqa: E501
'browser': 'browser', # noqa: E501
'tag': 'tag', # noqa: E501
'referrer': 'referrer', # noqa: E501
}

_composed_schemas = {}
Expand Down Expand Up @@ -164,6 +166,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
operating_system ([str]): Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.. [optional] # noqa: E501
browser ([str]): Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.. [optional] # noqa: E501
tag (str): Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).. [optional] # noqa: E501
referrer ([str]): Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. - The API filters for exact matches. Include the trailing `/` characters if needed. - The URLs you add must be URL encoded.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
2 changes: 1 addition & 1 deletion docs/AnalyticsAggregatedMetricsResponseContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metric** | **str** | Returns the metric you selected. | [optional]
**metric** | **str** | Returns the metric and relevant parameters you selected. | [optional]
**aggregation** | **str** | Returns the aggregation you selected. | [optional]
**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional]

Expand Down
Loading

0 comments on commit f7a60d6

Please sign in to comment.