gcore 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/_client.py +9 -0
- gcore/_models.py +24 -3
- gcore/_version.py +1 -1
- gcore/pagination.py +101 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/__init__.py +28 -0
- gcore/resources/cloud/cloud.py +64 -0
- gcore/resources/cloud/cost_reports.py +811 -0
- gcore/resources/cloud/file_shares/file_shares.py +10 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
- gcore/resources/cloud/inference/registry_credentials.py +4 -6
- gcore/resources/cloud/usage_reports.py +337 -0
- gcore/resources/streaming/__init__.py +159 -0
- gcore/resources/streaming/ai_tasks.py +1288 -0
- gcore/resources/streaming/broadcasts.py +579 -0
- gcore/resources/streaming/directories.py +515 -0
- gcore/resources/streaming/players.py +577 -0
- gcore/resources/streaming/playlists.py +1059 -0
- gcore/resources/streaming/quality_sets.py +331 -0
- gcore/resources/streaming/restreams.py +484 -0
- gcore/resources/streaming/statistics.py +3224 -0
- gcore/resources/streaming/streaming.py +390 -0
- gcore/resources/streaming/streams/__init__.py +33 -0
- gcore/resources/streaming/streams/overlays.py +716 -0
- gcore/resources/streaming/streams/streams.py +1592 -0
- gcore/resources/streaming/videos/__init__.py +33 -0
- gcore/resources/streaming/videos/subtitles.py +623 -0
- gcore/resources/streaming/videos/videos.py +1553 -0
- gcore/resources/waap/ip_info.py +28 -10
- gcore/types/cloud/__init__.py +10 -0
- gcore/types/cloud/cost_report_aggregated.py +865 -0
- gcore/types/cloud/cost_report_aggregated_monthly.py +865 -0
- gcore/types/cloud/cost_report_detailed.py +1343 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +394 -0
- gcore/types/cloud/cost_report_get_aggregated_params.py +409 -0
- gcore/types/cloud/cost_report_get_detailed_params.py +435 -0
- gcore/types/cloud/file_share.py +37 -3
- gcore/types/cloud/file_share_create_params.py +16 -0
- gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
- gcore/types/cloud/quota_get_all_response.py +24 -2
- gcore/types/cloud/quota_get_by_region_response.py +24 -2
- gcore/types/cloud/quotas/request_create_params.py +12 -1
- gcore/types/cloud/quotas/request_get_response.py +12 -1
- gcore/types/cloud/quotas/request_list_response.py +12 -1
- gcore/types/cloud/usage_report.py +1612 -0
- gcore/types/cloud/usage_report_get_params.py +432 -0
- gcore/types/streaming/__init__.py +143 -0
- gcore/types/streaming/ai_contentmoderation_casm.py +39 -0
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +54 -0
- gcore/types/streaming/ai_contentmoderation_nsfw.py +39 -0
- gcore/types/streaming/ai_contentmoderation_softnudity.py +66 -0
- gcore/types/streaming/ai_contentmoderation_sport.py +39 -0
- gcore/types/streaming/ai_contentmoderation_weapon.py +39 -0
- gcore/types/streaming/ai_task.py +205 -0
- gcore/types/streaming/ai_task_cancel_response.py +12 -0
- gcore/types/streaming/ai_task_create_params.py +168 -0
- gcore/types/streaming/ai_task_create_response.py +10 -0
- gcore/types/streaming/ai_task_get_ai_settings_params.py +27 -0
- gcore/types/streaming/ai_task_get_ai_settings_response.py +12 -0
- gcore/types/streaming/ai_task_get_response.py +313 -0
- gcore/types/streaming/ai_task_list_params.py +50 -0
- gcore/types/streaming/broadcast.py +71 -0
- gcore/types/streaming/broadcast_create_params.py +76 -0
- gcore/types/streaming/broadcast_list_params.py +12 -0
- gcore/types/streaming/broadcast_spectators_count.py +12 -0
- gcore/types/streaming/broadcast_update_params.py +76 -0
- gcore/types/streaming/clip.py +78 -0
- gcore/types/streaming/create_video_param.py +214 -0
- gcore/types/streaming/direct_upload_parameters.py +33 -0
- gcore/types/streaming/directories_tree.py +19 -0
- gcore/types/streaming/directory_base.py +31 -0
- gcore/types/streaming/directory_create_params.py +15 -0
- gcore/types/streaming/directory_get_response.py +19 -0
- gcore/types/streaming/directory_item.py +13 -0
- gcore/types/streaming/directory_update_params.py +18 -0
- gcore/types/streaming/directory_video.py +13 -0
- gcore/types/streaming/ffprobes.py +25 -0
- gcore/types/streaming/max_stream_series.py +21 -0
- gcore/types/streaming/meet_series.py +23 -0
- gcore/types/streaming/player.py +114 -0
- gcore/types/streaming/player_create_params.py +18 -0
- gcore/types/streaming/player_list_params.py +12 -0
- gcore/types/streaming/player_param.py +114 -0
- gcore/types/streaming/player_update_params.py +18 -0
- gcore/types/streaming/playlist.py +102 -0
- gcore/types/streaming/playlist_create.py +12 -0
- gcore/types/streaming/playlist_create_params.py +102 -0
- gcore/types/streaming/playlist_list_params.py +12 -0
- gcore/types/streaming/playlist_list_videos_response.py +10 -0
- gcore/types/streaming/playlist_update_params.py +102 -0
- gcore/types/streaming/playlist_video.py +215 -0
- gcore/types/streaming/popular_videos.py +17 -0
- gcore/types/streaming/quality_set_set_default_params.py +23 -0
- gcore/types/streaming/quality_sets.py +57 -0
- gcore/types/streaming/restream.py +37 -0
- gcore/types/streaming/restream_create_params.py +41 -0
- gcore/types/streaming/restream_list_params.py +12 -0
- gcore/types/streaming/restream_update_params.py +41 -0
- gcore/types/streaming/statistic_get_ffprobes_params.py +22 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_params.py +26 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_response.py +25 -0
- gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_max_streams_series_params.py +20 -0
- gcore/types/streaming/statistic_get_meet_series_params.py +20 -0
- gcore/types/streaming/statistic_get_popular_videos_params.py +15 -0
- gcore/types/streaming/statistic_get_storage_series_params.py +20 -0
- gcore/types/streaming/statistic_get_stream_series_params.py +20 -0
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +27 -0
- gcore/types/streaming/statistic_get_unique_viewers_params.py +34 -0
- gcore/types/streaming/statistic_get_views_by_browsers_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_country_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_hostname_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_operating_system_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_referer_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_region_params.py +15 -0
- gcore/types/streaming/statistic_get_views_heatmap_params.py +21 -0
- gcore/types/streaming/statistic_get_views_params.py +34 -0
- gcore/types/streaming/statistic_get_vod_storage_volume_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_transcoding_duration_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_unique_viewers_cdn_params.py +26 -0
- gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_response.py +22 -0
- gcore/types/streaming/storage_series.py +23 -0
- gcore/types/streaming/stream.py +420 -0
- gcore/types/streaming/stream_create_clip_params.py +48 -0
- gcore/types/streaming/stream_create_params.py +165 -0
- gcore/types/streaming/stream_list_clips_response.py +10 -0
- gcore/types/streaming/stream_list_params.py +18 -0
- gcore/types/streaming/stream_series.py +21 -0
- gcore/types/streaming/stream_start_recording_response.py +76 -0
- gcore/types/streaming/stream_update_params.py +169 -0
- gcore/types/streaming/streams/__init__.py +11 -0
- gcore/types/streaming/streams/overlay.py +43 -0
- gcore/types/streaming/streams/overlay_create_params.py +36 -0
- gcore/types/streaming/streams/overlay_create_response.py +10 -0
- gcore/types/streaming/streams/overlay_list_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_multiple_params.py +39 -0
- gcore/types/streaming/streams/overlay_update_multiple_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_params.py +33 -0
- gcore/types/streaming/subtitle.py +12 -0
- gcore/types/streaming/subtitle_base.py +18 -0
- gcore/types/streaming/subtitle_base_param.py +18 -0
- gcore/types/streaming/unique_viewers.py +35 -0
- gcore/types/streaming/unique_viewers_cdn.py +17 -0
- gcore/types/streaming/video.py +444 -0
- gcore/types/streaming/video_create_multiple_params.py +28 -0
- gcore/types/streaming/video_create_multiple_response.py +10 -0
- gcore/types/streaming/video_create_params.py +13 -0
- gcore/types/streaming/video_create_response.py +10 -0
- gcore/types/streaming/video_list_names_params.py +13 -0
- gcore/types/streaming/video_list_params.py +59 -0
- gcore/types/streaming/video_update_params.py +214 -0
- gcore/types/streaming/videos/__init__.py +7 -0
- gcore/types/streaming/videos/subtitle_create_params.py +17 -0
- gcore/types/streaming/videos/subtitle_list_response.py +10 -0
- gcore/types/streaming/videos/subtitle_update_params.py +20 -0
- gcore/types/streaming/views.py +35 -0
- gcore/types/streaming/views_by_browser.py +17 -0
- gcore/types/streaming/views_by_country.py +19 -0
- gcore/types/streaming/views_by_hostname.py +17 -0
- gcore/types/streaming/views_by_operating_system.py +17 -0
- gcore/types/streaming/views_by_referer.py +17 -0
- gcore/types/streaming/views_by_region.py +19 -0
- gcore/types/streaming/views_heatmap.py +19 -0
- gcore/types/streaming/vod_statistics_series.py +21 -0
- gcore/types/streaming/vod_total_stream_duration_series.py +22 -0
- gcore/types/waap/domains/custom_rule_create_params.py +4 -4
- gcore/types/waap/domains/custom_rule_update_params.py +4 -4
- gcore/types/waap/ip_info_get_blocked_requests_params.py +5 -1
- gcore/types/waap/ip_info_get_counts_params.py +2 -1
- gcore/types/waap/ip_info_get_top_sessions_params.py +5 -1
- gcore/types/waap/ip_info_get_top_urls_params.py +5 -1
- gcore/types/waap/ip_info_get_top_user_agents_params.py +5 -1
- gcore/types/waap/waap_custom_rule.py +4 -4
- {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/METADATA +1 -1
- {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/RECORD +181 -33
- {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/WHEEL +0 -0
- {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,3224 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ..._compat import cached_property
|
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ..._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.streaming import (
|
|
22
|
+
statistic_get_views_params,
|
|
23
|
+
statistic_get_ffprobes_params,
|
|
24
|
+
statistic_get_meet_series_params,
|
|
25
|
+
statistic_get_stream_series_params,
|
|
26
|
+
statistic_get_views_heatmap_params,
|
|
27
|
+
statistic_get_popular_videos_params,
|
|
28
|
+
statistic_get_storage_series_params,
|
|
29
|
+
statistic_get_unique_viewers_params,
|
|
30
|
+
statistic_get_views_by_region_params,
|
|
31
|
+
statistic_get_views_by_country_params,
|
|
32
|
+
statistic_get_views_by_referer_params,
|
|
33
|
+
statistic_get_views_by_browsers_params,
|
|
34
|
+
statistic_get_views_by_hostname_params,
|
|
35
|
+
statistic_get_max_streams_series_params,
|
|
36
|
+
statistic_get_unique_viewers_cdn_params,
|
|
37
|
+
statistic_get_vod_storage_volume_params,
|
|
38
|
+
statistic_get_vod_watch_time_cdn_params,
|
|
39
|
+
statistic_get_live_unique_viewers_params,
|
|
40
|
+
statistic_get_live_watch_time_cdn_params,
|
|
41
|
+
statistic_get_vod_unique_viewers_cdn_params,
|
|
42
|
+
statistic_get_vod_transcoding_duration_params,
|
|
43
|
+
statistic_get_vod_watch_time_total_cdn_params,
|
|
44
|
+
statistic_get_live_watch_time_total_cdn_params,
|
|
45
|
+
statistic_get_views_by_operating_system_params,
|
|
46
|
+
)
|
|
47
|
+
from ...types.streaming.views import Views
|
|
48
|
+
from ...types.streaming.ffprobes import Ffprobes
|
|
49
|
+
from ...types.streaming.meet_series import MeetSeries
|
|
50
|
+
from ...types.streaming.stream_series import StreamSeries
|
|
51
|
+
from ...types.streaming.views_heatmap import ViewsHeatmap
|
|
52
|
+
from ...types.streaming.popular_videos import PopularVideos
|
|
53
|
+
from ...types.streaming.storage_series import StorageSeries
|
|
54
|
+
from ...types.streaming.unique_viewers import UniqueViewers
|
|
55
|
+
from ...types.streaming.views_by_region import ViewsByRegion
|
|
56
|
+
from ...types.streaming.views_by_browser import ViewsByBrowser
|
|
57
|
+
from ...types.streaming.views_by_country import ViewsByCountry
|
|
58
|
+
from ...types.streaming.views_by_referer import ViewsByReferer
|
|
59
|
+
from ...types.streaming.max_stream_series import MaxStreamSeries
|
|
60
|
+
from ...types.streaming.views_by_hostname import ViewsByHostname
|
|
61
|
+
from ...types.streaming.unique_viewers_cdn import UniqueViewersCdn
|
|
62
|
+
from ...types.streaming.vod_statistics_series import VodStatisticsSeries
|
|
63
|
+
from ...types.streaming.views_by_operating_system import ViewsByOperatingSystem
|
|
64
|
+
from ...types.streaming.vod_total_stream_duration_series import VodTotalStreamDurationSeries
|
|
65
|
+
from ...types.streaming.statistic_get_live_unique_viewers_response import StatisticGetLiveUniqueViewersResponse
|
|
66
|
+
from ...types.streaming.statistic_get_vod_watch_time_total_cdn_response import StatisticGetVodWatchTimeTotalCdnResponse
|
|
67
|
+
|
|
68
|
+
__all__ = ["StatisticsResource", "AsyncStatisticsResource"]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class StatisticsResource(SyncAPIResource):
|
|
72
|
+
@cached_property
|
|
73
|
+
def with_raw_response(self) -> StatisticsResourceWithRawResponse:
|
|
74
|
+
"""
|
|
75
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
76
|
+
the raw response object instead of the parsed content.
|
|
77
|
+
|
|
78
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
79
|
+
"""
|
|
80
|
+
return StatisticsResourceWithRawResponse(self)
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def with_streaming_response(self) -> StatisticsResourceWithStreamingResponse:
|
|
84
|
+
"""
|
|
85
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
86
|
+
|
|
87
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
88
|
+
"""
|
|
89
|
+
return StatisticsResourceWithStreamingResponse(self)
|
|
90
|
+
|
|
91
|
+
def get_ffprobes(
|
|
92
|
+
self,
|
|
93
|
+
*,
|
|
94
|
+
date_from: str,
|
|
95
|
+
date_to: str,
|
|
96
|
+
stream_id: str,
|
|
97
|
+
interval: int | NotGiven = NOT_GIVEN,
|
|
98
|
+
units: Literal["second", "minute", "hour", "day", "week", "month"] | NotGiven = NOT_GIVEN,
|
|
99
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
100
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
101
|
+
extra_headers: Headers | None = None,
|
|
102
|
+
extra_query: Query | None = None,
|
|
103
|
+
extra_body: Body | None = None,
|
|
104
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
105
|
+
) -> Ffprobes:
|
|
106
|
+
"""
|
|
107
|
+
Aggregates data for the specified video stream in the specified time interval.
|
|
108
|
+
"interval" and "units" params working together to point aggregation interval.
|
|
109
|
+
You can use this method to watch when stream was alive in time, and when it was
|
|
110
|
+
off.
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
date_from: Start of time frame. Format is ISO 8601.
|
|
114
|
+
|
|
115
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
116
|
+
|
|
117
|
+
stream_id: Stream ID
|
|
118
|
+
|
|
119
|
+
extra_headers: Send extra headers
|
|
120
|
+
|
|
121
|
+
extra_query: Add additional query parameters to the request
|
|
122
|
+
|
|
123
|
+
extra_body: Add additional JSON properties to the request
|
|
124
|
+
|
|
125
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
126
|
+
"""
|
|
127
|
+
return self._get(
|
|
128
|
+
"/streaming/statistics/ffprobe",
|
|
129
|
+
options=make_request_options(
|
|
130
|
+
extra_headers=extra_headers,
|
|
131
|
+
extra_query=extra_query,
|
|
132
|
+
extra_body=extra_body,
|
|
133
|
+
timeout=timeout,
|
|
134
|
+
query=maybe_transform(
|
|
135
|
+
{
|
|
136
|
+
"date_from": date_from,
|
|
137
|
+
"date_to": date_to,
|
|
138
|
+
"stream_id": stream_id,
|
|
139
|
+
"interval": interval,
|
|
140
|
+
"units": units,
|
|
141
|
+
},
|
|
142
|
+
statistic_get_ffprobes_params.StatisticGetFfprobesParams,
|
|
143
|
+
),
|
|
144
|
+
),
|
|
145
|
+
cast_to=Ffprobes,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def get_live_unique_viewers(
|
|
149
|
+
self,
|
|
150
|
+
*,
|
|
151
|
+
from_: str,
|
|
152
|
+
to: str,
|
|
153
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
154
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
155
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
156
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
157
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
158
|
+
extra_headers: Headers | None = None,
|
|
159
|
+
extra_query: Query | None = None,
|
|
160
|
+
extra_body: Body | None = None,
|
|
161
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
162
|
+
) -> StatisticGetLiveUniqueViewersResponse:
|
|
163
|
+
"""Calculates time series of unique viewers of Live streams via CDN.
|
|
164
|
+
|
|
165
|
+
The statistics
|
|
166
|
+
are taken from the data of CDN and work regardless of which player the views
|
|
167
|
+
were made with. Works similar to the method `/statistics/cdn/uniqs`. But this
|
|
168
|
+
allows you to break down data with the specified granularity: minutes, hours,
|
|
169
|
+
days. Based on this method, a graph of unique views in the Customer Portal is
|
|
170
|
+
built.
|
|
171
|
+

|
|
172
|
+
|
|
173
|
+
Args:
|
|
174
|
+
from_: Start of time frame. Format is date time in ISO 8601
|
|
175
|
+
|
|
176
|
+
to: End of time frame. Format is date time in ISO 8601
|
|
177
|
+
|
|
178
|
+
client_user_id: Filter by "`client_user_id`"
|
|
179
|
+
|
|
180
|
+
granularity: Specifies the time interval for grouping data
|
|
181
|
+
|
|
182
|
+
stream_id: Filter by "`stream_id`"
|
|
183
|
+
|
|
184
|
+
extra_headers: Send extra headers
|
|
185
|
+
|
|
186
|
+
extra_query: Add additional query parameters to the request
|
|
187
|
+
|
|
188
|
+
extra_body: Add additional JSON properties to the request
|
|
189
|
+
|
|
190
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
191
|
+
"""
|
|
192
|
+
return self._get(
|
|
193
|
+
"/streaming/statistics/stream/viewers",
|
|
194
|
+
options=make_request_options(
|
|
195
|
+
extra_headers=extra_headers,
|
|
196
|
+
extra_query=extra_query,
|
|
197
|
+
extra_body=extra_body,
|
|
198
|
+
timeout=timeout,
|
|
199
|
+
query=maybe_transform(
|
|
200
|
+
{
|
|
201
|
+
"from_": from_,
|
|
202
|
+
"to": to,
|
|
203
|
+
"client_user_id": client_user_id,
|
|
204
|
+
"granularity": granularity,
|
|
205
|
+
"stream_id": stream_id,
|
|
206
|
+
},
|
|
207
|
+
statistic_get_live_unique_viewers_params.StatisticGetLiveUniqueViewersParams,
|
|
208
|
+
),
|
|
209
|
+
),
|
|
210
|
+
cast_to=StatisticGetLiveUniqueViewersResponse,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
def get_live_watch_time_cdn(
|
|
214
|
+
self,
|
|
215
|
+
*,
|
|
216
|
+
from_: str,
|
|
217
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
218
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
|
|
219
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
220
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
221
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
222
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
223
|
+
extra_headers: Headers | None = None,
|
|
224
|
+
extra_query: Query | None = None,
|
|
225
|
+
extra_body: Body | None = None,
|
|
226
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
227
|
+
) -> StreamSeries:
|
|
228
|
+
"""Calculates a time series of live streams watching duration in minutes.
|
|
229
|
+
|
|
230
|
+
Views of
|
|
231
|
+
only those streams that meet the specified filters are summed up. The statistics
|
|
232
|
+
are taken from the data of CDN and work regardless of which player the views
|
|
233
|
+
were made with. Please note that the result for each time interval is in
|
|
234
|
+
minutes, it is rounded to the nearest upper integer. You cannot use the sum of
|
|
235
|
+
all intervals as the total watch time value; instead, use the /total method.
|
|
236
|
+
|
|
237
|
+
Args:
|
|
238
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
239
|
+
in ISO 8601.
|
|
240
|
+
|
|
241
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
242
|
+
|
|
243
|
+
granularity: Data is grouped by the specified time interval
|
|
244
|
+
|
|
245
|
+
stream_id: Filter by `stream_id`
|
|
246
|
+
|
|
247
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
248
|
+
time is taken
|
|
249
|
+
|
|
250
|
+
extra_headers: Send extra headers
|
|
251
|
+
|
|
252
|
+
extra_query: Add additional query parameters to the request
|
|
253
|
+
|
|
254
|
+
extra_body: Add additional JSON properties to the request
|
|
255
|
+
|
|
256
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
257
|
+
"""
|
|
258
|
+
return self._get(
|
|
259
|
+
"/streaming/statistics/stream/watching_duration",
|
|
260
|
+
options=make_request_options(
|
|
261
|
+
extra_headers=extra_headers,
|
|
262
|
+
extra_query=extra_query,
|
|
263
|
+
extra_body=extra_body,
|
|
264
|
+
timeout=timeout,
|
|
265
|
+
query=maybe_transform(
|
|
266
|
+
{
|
|
267
|
+
"from_": from_,
|
|
268
|
+
"client_user_id": client_user_id,
|
|
269
|
+
"granularity": granularity,
|
|
270
|
+
"stream_id": stream_id,
|
|
271
|
+
"to": to,
|
|
272
|
+
},
|
|
273
|
+
statistic_get_live_watch_time_cdn_params.StatisticGetLiveWatchTimeCdnParams,
|
|
274
|
+
),
|
|
275
|
+
),
|
|
276
|
+
cast_to=StreamSeries,
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
def get_live_watch_time_total_cdn(
|
|
280
|
+
self,
|
|
281
|
+
*,
|
|
282
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
283
|
+
from_: str | NotGiven = NOT_GIVEN,
|
|
284
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
285
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
286
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
287
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
288
|
+
extra_headers: Headers | None = None,
|
|
289
|
+
extra_query: Query | None = None,
|
|
290
|
+
extra_body: Body | None = None,
|
|
291
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
292
|
+
) -> VodTotalStreamDurationSeries:
|
|
293
|
+
"""Calculates the total duration of live streams watching in minutes.
|
|
294
|
+
|
|
295
|
+
Views of only
|
|
296
|
+
those streams that meet the specified filters are summed up. The statistics are
|
|
297
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
298
|
+
made with.
|
|
299
|
+
|
|
300
|
+
Args:
|
|
301
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
302
|
+
|
|
303
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
304
|
+
in ISO 8601. If omitted, the earliest start time for viewing is taken
|
|
305
|
+
|
|
306
|
+
stream_id: Filter by `stream_id`
|
|
307
|
+
|
|
308
|
+
to: End of time frame. Datetime in ISO 8601 format. If missed, then the current time
|
|
309
|
+
is taken
|
|
310
|
+
|
|
311
|
+
extra_headers: Send extra headers
|
|
312
|
+
|
|
313
|
+
extra_query: Add additional query parameters to the request
|
|
314
|
+
|
|
315
|
+
extra_body: Add additional JSON properties to the request
|
|
316
|
+
|
|
317
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
318
|
+
"""
|
|
319
|
+
return self._get(
|
|
320
|
+
"/streaming/statistics/stream/watching_duration/total",
|
|
321
|
+
options=make_request_options(
|
|
322
|
+
extra_headers=extra_headers,
|
|
323
|
+
extra_query=extra_query,
|
|
324
|
+
extra_body=extra_body,
|
|
325
|
+
timeout=timeout,
|
|
326
|
+
query=maybe_transform(
|
|
327
|
+
{
|
|
328
|
+
"client_user_id": client_user_id,
|
|
329
|
+
"from_": from_,
|
|
330
|
+
"stream_id": stream_id,
|
|
331
|
+
"to": to,
|
|
332
|
+
},
|
|
333
|
+
statistic_get_live_watch_time_total_cdn_params.StatisticGetLiveWatchTimeTotalCdnParams,
|
|
334
|
+
),
|
|
335
|
+
),
|
|
336
|
+
cast_to=VodTotalStreamDurationSeries,
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
def get_max_streams_series(
|
|
340
|
+
self,
|
|
341
|
+
*,
|
|
342
|
+
from_: str,
|
|
343
|
+
to: str,
|
|
344
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
345
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
346
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
347
|
+
extra_headers: Headers | None = None,
|
|
348
|
+
extra_query: Query | None = None,
|
|
349
|
+
extra_body: Body | None = None,
|
|
350
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
351
|
+
) -> MaxStreamSeries:
|
|
352
|
+
"""Calculates time series of the amount of simultaneous streams.
|
|
353
|
+
|
|
354
|
+
The data is
|
|
355
|
+
updated near realtime.
|
|
356
|
+
|
|
357
|
+
Args:
|
|
358
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
359
|
+
|
|
360
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
361
|
+
|
|
362
|
+
granularity: specifies the time interval for grouping data
|
|
363
|
+
|
|
364
|
+
extra_headers: Send extra headers
|
|
365
|
+
|
|
366
|
+
extra_query: Add additional query parameters to the request
|
|
367
|
+
|
|
368
|
+
extra_body: Add additional JSON properties to the request
|
|
369
|
+
|
|
370
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
371
|
+
"""
|
|
372
|
+
return self._get(
|
|
373
|
+
"/streaming/statistics/max_stream",
|
|
374
|
+
options=make_request_options(
|
|
375
|
+
extra_headers=extra_headers,
|
|
376
|
+
extra_query=extra_query,
|
|
377
|
+
extra_body=extra_body,
|
|
378
|
+
timeout=timeout,
|
|
379
|
+
query=maybe_transform(
|
|
380
|
+
{
|
|
381
|
+
"from_": from_,
|
|
382
|
+
"to": to,
|
|
383
|
+
"granularity": granularity,
|
|
384
|
+
},
|
|
385
|
+
statistic_get_max_streams_series_params.StatisticGetMaxStreamsSeriesParams,
|
|
386
|
+
),
|
|
387
|
+
),
|
|
388
|
+
cast_to=MaxStreamSeries,
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
def get_meet_series(
|
|
392
|
+
self,
|
|
393
|
+
*,
|
|
394
|
+
from_: str,
|
|
395
|
+
to: str,
|
|
396
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
397
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
398
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
399
|
+
extra_headers: Headers | None = None,
|
|
400
|
+
extra_query: Query | None = None,
|
|
401
|
+
extra_body: Body | None = None,
|
|
402
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
403
|
+
) -> MeetSeries:
|
|
404
|
+
"""Calculates time series of the transcoding minutes of all streams.
|
|
405
|
+
|
|
406
|
+
The data is
|
|
407
|
+
updated near realtime.
|
|
408
|
+
|
|
409
|
+
Args:
|
|
410
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
411
|
+
|
|
412
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
413
|
+
|
|
414
|
+
granularity: specifies the time interval for grouping data
|
|
415
|
+
|
|
416
|
+
extra_headers: Send extra headers
|
|
417
|
+
|
|
418
|
+
extra_query: Add additional query parameters to the request
|
|
419
|
+
|
|
420
|
+
extra_body: Add additional JSON properties to the request
|
|
421
|
+
|
|
422
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
423
|
+
"""
|
|
424
|
+
return self._get(
|
|
425
|
+
"/streaming/statistics/meet",
|
|
426
|
+
options=make_request_options(
|
|
427
|
+
extra_headers=extra_headers,
|
|
428
|
+
extra_query=extra_query,
|
|
429
|
+
extra_body=extra_body,
|
|
430
|
+
timeout=timeout,
|
|
431
|
+
query=maybe_transform(
|
|
432
|
+
{
|
|
433
|
+
"from_": from_,
|
|
434
|
+
"to": to,
|
|
435
|
+
"granularity": granularity,
|
|
436
|
+
},
|
|
437
|
+
statistic_get_meet_series_params.StatisticGetMeetSeriesParams,
|
|
438
|
+
),
|
|
439
|
+
),
|
|
440
|
+
cast_to=MeetSeries,
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
def get_popular_videos(
|
|
444
|
+
self,
|
|
445
|
+
*,
|
|
446
|
+
date_from: str,
|
|
447
|
+
date_to: str,
|
|
448
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
449
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
450
|
+
extra_headers: Headers | None = None,
|
|
451
|
+
extra_query: Query | None = None,
|
|
452
|
+
extra_body: Body | None = None,
|
|
453
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
454
|
+
) -> PopularVideos:
|
|
455
|
+
"""
|
|
456
|
+
Aggregates the number of views for all client videos, grouping them by id and
|
|
457
|
+
sort from most popular to less in the built-in player. Note. This method
|
|
458
|
+
operates only on data collected by the built-in HTML player. It will not show
|
|
459
|
+
statistics if you are using another player or viewing in native OS players
|
|
460
|
+
through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations through
|
|
461
|
+
CDN (look at method /statistics/cdn/uniqs) or statistics of the players you have
|
|
462
|
+
chosen.
|
|
463
|
+
|
|
464
|
+
Args:
|
|
465
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
466
|
+
|
|
467
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
468
|
+
|
|
469
|
+
extra_headers: Send extra headers
|
|
470
|
+
|
|
471
|
+
extra_query: Add additional query parameters to the request
|
|
472
|
+
|
|
473
|
+
extra_body: Add additional JSON properties to the request
|
|
474
|
+
|
|
475
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
476
|
+
"""
|
|
477
|
+
return self._get(
|
|
478
|
+
"/streaming/statistics/popular",
|
|
479
|
+
options=make_request_options(
|
|
480
|
+
extra_headers=extra_headers,
|
|
481
|
+
extra_query=extra_query,
|
|
482
|
+
extra_body=extra_body,
|
|
483
|
+
timeout=timeout,
|
|
484
|
+
query=maybe_transform(
|
|
485
|
+
{
|
|
486
|
+
"date_from": date_from,
|
|
487
|
+
"date_to": date_to,
|
|
488
|
+
},
|
|
489
|
+
statistic_get_popular_videos_params.StatisticGetPopularVideosParams,
|
|
490
|
+
),
|
|
491
|
+
),
|
|
492
|
+
cast_to=PopularVideos,
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
def get_storage_series(
|
|
496
|
+
self,
|
|
497
|
+
*,
|
|
498
|
+
from_: str,
|
|
499
|
+
to: str,
|
|
500
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
501
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
502
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
503
|
+
extra_headers: Headers | None = None,
|
|
504
|
+
extra_query: Query | None = None,
|
|
505
|
+
extra_body: Body | None = None,
|
|
506
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
507
|
+
) -> StorageSeries:
|
|
508
|
+
"""
|
|
509
|
+
Calculates time series of the size of disk space in bytes for all processed and
|
|
510
|
+
undeleted client videos. The data is updated every 8 hours, it does not make
|
|
511
|
+
sense to set the granulation less than 1 day.
|
|
512
|
+
|
|
513
|
+
Args:
|
|
514
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
515
|
+
|
|
516
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
517
|
+
|
|
518
|
+
granularity: specifies the time interval for grouping data
|
|
519
|
+
|
|
520
|
+
extra_headers: Send extra headers
|
|
521
|
+
|
|
522
|
+
extra_query: Add additional query parameters to the request
|
|
523
|
+
|
|
524
|
+
extra_body: Add additional JSON properties to the request
|
|
525
|
+
|
|
526
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
527
|
+
"""
|
|
528
|
+
return self._get(
|
|
529
|
+
"/streaming/statistics/storage",
|
|
530
|
+
options=make_request_options(
|
|
531
|
+
extra_headers=extra_headers,
|
|
532
|
+
extra_query=extra_query,
|
|
533
|
+
extra_body=extra_body,
|
|
534
|
+
timeout=timeout,
|
|
535
|
+
query=maybe_transform(
|
|
536
|
+
{
|
|
537
|
+
"from_": from_,
|
|
538
|
+
"to": to,
|
|
539
|
+
"granularity": granularity,
|
|
540
|
+
},
|
|
541
|
+
statistic_get_storage_series_params.StatisticGetStorageSeriesParams,
|
|
542
|
+
),
|
|
543
|
+
),
|
|
544
|
+
cast_to=StorageSeries,
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
def get_stream_series(
|
|
548
|
+
self,
|
|
549
|
+
*,
|
|
550
|
+
from_: str,
|
|
551
|
+
to: str,
|
|
552
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
553
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
554
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
555
|
+
extra_headers: Headers | None = None,
|
|
556
|
+
extra_query: Query | None = None,
|
|
557
|
+
extra_body: Body | None = None,
|
|
558
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
559
|
+
) -> StreamSeries:
|
|
560
|
+
"""Calculates time series of the transcoding minutes of all streams.
|
|
561
|
+
|
|
562
|
+
The data is
|
|
563
|
+
updated near realtime.
|
|
564
|
+
|
|
565
|
+
Args:
|
|
566
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
567
|
+
|
|
568
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
569
|
+
|
|
570
|
+
granularity: specifies the time interval for grouping data
|
|
571
|
+
|
|
572
|
+
extra_headers: Send extra headers
|
|
573
|
+
|
|
574
|
+
extra_query: Add additional query parameters to the request
|
|
575
|
+
|
|
576
|
+
extra_body: Add additional JSON properties to the request
|
|
577
|
+
|
|
578
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
579
|
+
"""
|
|
580
|
+
return self._get(
|
|
581
|
+
"/streaming/statistics/stream",
|
|
582
|
+
options=make_request_options(
|
|
583
|
+
extra_headers=extra_headers,
|
|
584
|
+
extra_query=extra_query,
|
|
585
|
+
extra_body=extra_body,
|
|
586
|
+
timeout=timeout,
|
|
587
|
+
query=maybe_transform(
|
|
588
|
+
{
|
|
589
|
+
"from_": from_,
|
|
590
|
+
"to": to,
|
|
591
|
+
"granularity": granularity,
|
|
592
|
+
},
|
|
593
|
+
statistic_get_stream_series_params.StatisticGetStreamSeriesParams,
|
|
594
|
+
),
|
|
595
|
+
),
|
|
596
|
+
cast_to=StreamSeries,
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
def get_unique_viewers(
|
|
600
|
+
self,
|
|
601
|
+
*,
|
|
602
|
+
date_from: str,
|
|
603
|
+
date_to: str,
|
|
604
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
605
|
+
country: str | NotGiven = NOT_GIVEN,
|
|
606
|
+
event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
|
|
607
|
+
group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]]
|
|
608
|
+
| NotGiven = NOT_GIVEN,
|
|
609
|
+
host: str | NotGiven = NOT_GIVEN,
|
|
610
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
611
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
612
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
613
|
+
extra_headers: Headers | None = None,
|
|
614
|
+
extra_query: Query | None = None,
|
|
615
|
+
extra_body: Body | None = None,
|
|
616
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
617
|
+
) -> UniqueViewers:
|
|
618
|
+
"""Get the number of unique viewers in the built-in player.
|
|
619
|
+
|
|
620
|
+
Counts the number of
|
|
621
|
+
unique IPs. Allows flexible grouping and filtering. The fields in the response
|
|
622
|
+
depend on the selected grouping. Note. This method operates only on data
|
|
623
|
+
collected by the built-in HTML player. It will not show statistics if you are
|
|
624
|
+
using another player or viewing in native OS players through direct
|
|
625
|
+
.m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
|
|
626
|
+
method /statistics/cdn/uniqs) or statistics of the players you have chosen.
|
|
627
|
+
|
|
628
|
+
Args:
|
|
629
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
630
|
+
|
|
631
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
632
|
+
|
|
633
|
+
id: filter by entity's id
|
|
634
|
+
|
|
635
|
+
country: filter by country
|
|
636
|
+
|
|
637
|
+
event: filter by event's name
|
|
638
|
+
|
|
639
|
+
group: group=1,2,4 OR group=1&group=2&group=3
|
|
640
|
+
|
|
641
|
+
host: filter by host
|
|
642
|
+
|
|
643
|
+
type: filter by entity's type
|
|
644
|
+
|
|
645
|
+
extra_headers: Send extra headers
|
|
646
|
+
|
|
647
|
+
extra_query: Add additional query parameters to the request
|
|
648
|
+
|
|
649
|
+
extra_body: Add additional JSON properties to the request
|
|
650
|
+
|
|
651
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
652
|
+
"""
|
|
653
|
+
return self._get(
|
|
654
|
+
"/streaming/statistics/uniqs",
|
|
655
|
+
options=make_request_options(
|
|
656
|
+
extra_headers=extra_headers,
|
|
657
|
+
extra_query=extra_query,
|
|
658
|
+
extra_body=extra_body,
|
|
659
|
+
timeout=timeout,
|
|
660
|
+
query=maybe_transform(
|
|
661
|
+
{
|
|
662
|
+
"date_from": date_from,
|
|
663
|
+
"date_to": date_to,
|
|
664
|
+
"id": id,
|
|
665
|
+
"country": country,
|
|
666
|
+
"event": event,
|
|
667
|
+
"group": group,
|
|
668
|
+
"host": host,
|
|
669
|
+
"type": type,
|
|
670
|
+
},
|
|
671
|
+
statistic_get_unique_viewers_params.StatisticGetUniqueViewersParams,
|
|
672
|
+
),
|
|
673
|
+
),
|
|
674
|
+
cast_to=UniqueViewers,
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
def get_unique_viewers_cdn(
|
|
678
|
+
self,
|
|
679
|
+
*,
|
|
680
|
+
date_from: str,
|
|
681
|
+
date_to: str,
|
|
682
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
683
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
684
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
685
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
686
|
+
extra_headers: Headers | None = None,
|
|
687
|
+
extra_query: Query | None = None,
|
|
688
|
+
extra_body: Body | None = None,
|
|
689
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
690
|
+
) -> UniqueViewersCdn:
|
|
691
|
+
"""Сounts the number of unique viewers of a video entity over CDN.
|
|
692
|
+
|
|
693
|
+
It doesn't
|
|
694
|
+
matter what player you used. All unique viewers for the specified period of time
|
|
695
|
+
are counted. **How does it work?** Calculating the number of unique viewers for
|
|
696
|
+
a Live stream or VOD over CDN involves aggregating and analyzing various metrics
|
|
697
|
+
to ensure each individual viewer is counted only once, regardless of how many
|
|
698
|
+
times they connect or disconnect during the stream. This method provides
|
|
699
|
+
statistics for any video viewing by unique users, regardless of viewing method
|
|
700
|
+
and a player you used. Thus, this is the most important difference from viewing
|
|
701
|
+
through the built-in player:
|
|
702
|
+
|
|
703
|
+
- In method /statistics/uniqs viewers of the built-in player are tracked only.
|
|
704
|
+
- But this method tracks all viewers from everywhere. This method is a
|
|
705
|
+
combination of two other Live and VOD detailed methods. If you need detailed
|
|
706
|
+
information, then see the methods: `/statistics/stream/viewers` and
|
|
707
|
+
`/statistics/vod/viewers`. **Data Processing and Deduplication** We us IP
|
|
708
|
+
Address & User-Agent combination. Each unique combination of IP address and
|
|
709
|
+
User-Agent string might be considered a unique viewer. This approach allows to
|
|
710
|
+
accurately estimate the number of unique viewers. However, this is not
|
|
711
|
+
foolproof due to NAT (Network Address Translation) and shared networks. Thus
|
|
712
|
+
if your users fall under such restrictions, then the number of unique viewers
|
|
713
|
+
may be higher than calculated. **Why is there no "Unique Views" method?**
|
|
714
|
+
Based on CDN data, we can calculate the number of unique viewers only. Thus
|
|
715
|
+
only your player will be able to count the number of unique views (clicks on
|
|
716
|
+
the Play button) within the player session (i.e. how many times 1 unique
|
|
717
|
+
viewer clicked the Play button within a unique player's session).
|
|
718
|
+
|
|
719
|
+
Args:
|
|
720
|
+
date_from: Start of time frame. Format is date time in ISO 8601.
|
|
721
|
+
|
|
722
|
+
date_to: End of time frame. Format is date time in ISO 8601.
|
|
723
|
+
|
|
724
|
+
id: Filter by entity's id. Put ID of a Live stream, VOD or a playlist to be
|
|
725
|
+
calculated. If the value is omitted, then the calculation is done for all
|
|
726
|
+
videos/streams of the specified type. When using this "id" parameter, be sure to
|
|
727
|
+
specify the "type" parameter too. If you do not specify a type, the "id" will be
|
|
728
|
+
ignored.
|
|
729
|
+
|
|
730
|
+
type: Filter by entity's type
|
|
731
|
+
|
|
732
|
+
extra_headers: Send extra headers
|
|
733
|
+
|
|
734
|
+
extra_query: Add additional query parameters to the request
|
|
735
|
+
|
|
736
|
+
extra_body: Add additional JSON properties to the request
|
|
737
|
+
|
|
738
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
739
|
+
"""
|
|
740
|
+
return self._get(
|
|
741
|
+
"/streaming/statistics/cdn/uniqs",
|
|
742
|
+
options=make_request_options(
|
|
743
|
+
extra_headers=extra_headers,
|
|
744
|
+
extra_query=extra_query,
|
|
745
|
+
extra_body=extra_body,
|
|
746
|
+
timeout=timeout,
|
|
747
|
+
query=maybe_transform(
|
|
748
|
+
{
|
|
749
|
+
"date_from": date_from,
|
|
750
|
+
"date_to": date_to,
|
|
751
|
+
"id": id,
|
|
752
|
+
"type": type,
|
|
753
|
+
},
|
|
754
|
+
statistic_get_unique_viewers_cdn_params.StatisticGetUniqueViewersCdnParams,
|
|
755
|
+
),
|
|
756
|
+
),
|
|
757
|
+
cast_to=UniqueViewersCdn,
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
def get_views(
|
|
761
|
+
self,
|
|
762
|
+
*,
|
|
763
|
+
date_from: str,
|
|
764
|
+
date_to: str,
|
|
765
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
766
|
+
country: str | NotGiven = NOT_GIVEN,
|
|
767
|
+
event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
|
|
768
|
+
group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]]
|
|
769
|
+
| NotGiven = NOT_GIVEN,
|
|
770
|
+
host: str | NotGiven = NOT_GIVEN,
|
|
771
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
772
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
773
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
774
|
+
extra_headers: Headers | None = None,
|
|
775
|
+
extra_query: Query | None = None,
|
|
776
|
+
extra_body: Body | None = None,
|
|
777
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
778
|
+
) -> Views:
|
|
779
|
+
"""Get the number of views in the built-in player.
|
|
780
|
+
|
|
781
|
+
Allows flexible grouping and
|
|
782
|
+
filtering. The fields in the response depend on the selected grouping. Note.
|
|
783
|
+
This method operates only on data collected by the built-in HTML player. It will
|
|
784
|
+
not show statistics if you are using another player or viewing in native OS
|
|
785
|
+
players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
|
|
786
|
+
through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
|
|
787
|
+
you have chosen.
|
|
788
|
+
|
|
789
|
+
Args:
|
|
790
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
791
|
+
|
|
792
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
793
|
+
|
|
794
|
+
id: filter by entity's id
|
|
795
|
+
|
|
796
|
+
country: filter by country
|
|
797
|
+
|
|
798
|
+
event: filter by event's name
|
|
799
|
+
|
|
800
|
+
group: group=1,2,4 OR group=1&group=2&group=3
|
|
801
|
+
|
|
802
|
+
host: filter by host
|
|
803
|
+
|
|
804
|
+
type: filter by entity's type
|
|
805
|
+
|
|
806
|
+
extra_headers: Send extra headers
|
|
807
|
+
|
|
808
|
+
extra_query: Add additional query parameters to the request
|
|
809
|
+
|
|
810
|
+
extra_body: Add additional JSON properties to the request
|
|
811
|
+
|
|
812
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
813
|
+
"""
|
|
814
|
+
return self._get(
|
|
815
|
+
"/streaming/statistics/views",
|
|
816
|
+
options=make_request_options(
|
|
817
|
+
extra_headers=extra_headers,
|
|
818
|
+
extra_query=extra_query,
|
|
819
|
+
extra_body=extra_body,
|
|
820
|
+
timeout=timeout,
|
|
821
|
+
query=maybe_transform(
|
|
822
|
+
{
|
|
823
|
+
"date_from": date_from,
|
|
824
|
+
"date_to": date_to,
|
|
825
|
+
"id": id,
|
|
826
|
+
"country": country,
|
|
827
|
+
"event": event,
|
|
828
|
+
"group": group,
|
|
829
|
+
"host": host,
|
|
830
|
+
"type": type,
|
|
831
|
+
},
|
|
832
|
+
statistic_get_views_params.StatisticGetViewsParams,
|
|
833
|
+
),
|
|
834
|
+
),
|
|
835
|
+
cast_to=Views,
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
def get_views_by_browsers(
|
|
839
|
+
self,
|
|
840
|
+
*,
|
|
841
|
+
date_from: str,
|
|
842
|
+
date_to: str,
|
|
843
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
844
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
845
|
+
extra_headers: Headers | None = None,
|
|
846
|
+
extra_query: Query | None = None,
|
|
847
|
+
extra_body: Body | None = None,
|
|
848
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
849
|
+
) -> ViewsByBrowser:
|
|
850
|
+
"""
|
|
851
|
+
Aggregates the number of views for all client videos, grouping them by browsers
|
|
852
|
+
in the built-in player. Note. This method operates only on data collected by the
|
|
853
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
854
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
855
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
856
|
+
or statistics of the players you have chosen.
|
|
857
|
+
|
|
858
|
+
Args:
|
|
859
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
860
|
+
|
|
861
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
862
|
+
|
|
863
|
+
extra_headers: Send extra headers
|
|
864
|
+
|
|
865
|
+
extra_query: Add additional query parameters to the request
|
|
866
|
+
|
|
867
|
+
extra_body: Add additional JSON properties to the request
|
|
868
|
+
|
|
869
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
870
|
+
"""
|
|
871
|
+
return self._get(
|
|
872
|
+
"/streaming/statistics/browsers",
|
|
873
|
+
options=make_request_options(
|
|
874
|
+
extra_headers=extra_headers,
|
|
875
|
+
extra_query=extra_query,
|
|
876
|
+
extra_body=extra_body,
|
|
877
|
+
timeout=timeout,
|
|
878
|
+
query=maybe_transform(
|
|
879
|
+
{
|
|
880
|
+
"date_from": date_from,
|
|
881
|
+
"date_to": date_to,
|
|
882
|
+
},
|
|
883
|
+
statistic_get_views_by_browsers_params.StatisticGetViewsByBrowsersParams,
|
|
884
|
+
),
|
|
885
|
+
),
|
|
886
|
+
cast_to=ViewsByBrowser,
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
def get_views_by_country(
|
|
890
|
+
self,
|
|
891
|
+
*,
|
|
892
|
+
date_from: str,
|
|
893
|
+
date_to: str,
|
|
894
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
895
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
896
|
+
extra_headers: Headers | None = None,
|
|
897
|
+
extra_query: Query | None = None,
|
|
898
|
+
extra_body: Body | None = None,
|
|
899
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
900
|
+
) -> ViewsByCountry:
|
|
901
|
+
"""
|
|
902
|
+
Aggregates the number of views grouping them by country in the built-in player.
|
|
903
|
+
Note. This method operates only on data collected by the built-in HTML player.
|
|
904
|
+
It will not show statistics if you are using another player or viewing in native
|
|
905
|
+
OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
|
|
906
|
+
calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
|
|
907
|
+
the players you have chosen.
|
|
908
|
+
|
|
909
|
+
Args:
|
|
910
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
911
|
+
|
|
912
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
913
|
+
|
|
914
|
+
extra_headers: Send extra headers
|
|
915
|
+
|
|
916
|
+
extra_query: Add additional query parameters to the request
|
|
917
|
+
|
|
918
|
+
extra_body: Add additional JSON properties to the request
|
|
919
|
+
|
|
920
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
921
|
+
"""
|
|
922
|
+
return self._get(
|
|
923
|
+
"/streaming/statistics/countries",
|
|
924
|
+
options=make_request_options(
|
|
925
|
+
extra_headers=extra_headers,
|
|
926
|
+
extra_query=extra_query,
|
|
927
|
+
extra_body=extra_body,
|
|
928
|
+
timeout=timeout,
|
|
929
|
+
query=maybe_transform(
|
|
930
|
+
{
|
|
931
|
+
"date_from": date_from,
|
|
932
|
+
"date_to": date_to,
|
|
933
|
+
},
|
|
934
|
+
statistic_get_views_by_country_params.StatisticGetViewsByCountryParams,
|
|
935
|
+
),
|
|
936
|
+
),
|
|
937
|
+
cast_to=ViewsByCountry,
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
def get_views_by_hostname(
|
|
941
|
+
self,
|
|
942
|
+
*,
|
|
943
|
+
date_from: str,
|
|
944
|
+
date_to: str,
|
|
945
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
946
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
947
|
+
extra_headers: Headers | None = None,
|
|
948
|
+
extra_query: Query | None = None,
|
|
949
|
+
extra_body: Body | None = None,
|
|
950
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
951
|
+
) -> ViewsByHostname:
|
|
952
|
+
"""
|
|
953
|
+
Aggregates the number of views, grouping them by "host" domain name the built-in
|
|
954
|
+
player was embeded to. Note. This method operates only on data collected by the
|
|
955
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
956
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
957
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
958
|
+
or statistics of the players you have chosen.
|
|
959
|
+
|
|
960
|
+
Args:
|
|
961
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
962
|
+
|
|
963
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
964
|
+
|
|
965
|
+
extra_headers: Send extra headers
|
|
966
|
+
|
|
967
|
+
extra_query: Add additional query parameters to the request
|
|
968
|
+
|
|
969
|
+
extra_body: Add additional JSON properties to the request
|
|
970
|
+
|
|
971
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
972
|
+
"""
|
|
973
|
+
return self._get(
|
|
974
|
+
"/streaming/statistics/hosts",
|
|
975
|
+
options=make_request_options(
|
|
976
|
+
extra_headers=extra_headers,
|
|
977
|
+
extra_query=extra_query,
|
|
978
|
+
extra_body=extra_body,
|
|
979
|
+
timeout=timeout,
|
|
980
|
+
query=maybe_transform(
|
|
981
|
+
{
|
|
982
|
+
"date_from": date_from,
|
|
983
|
+
"date_to": date_to,
|
|
984
|
+
},
|
|
985
|
+
statistic_get_views_by_hostname_params.StatisticGetViewsByHostnameParams,
|
|
986
|
+
),
|
|
987
|
+
),
|
|
988
|
+
cast_to=ViewsByHostname,
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
def get_views_by_operating_system(
|
|
992
|
+
self,
|
|
993
|
+
*,
|
|
994
|
+
date_from: str,
|
|
995
|
+
date_to: str,
|
|
996
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
997
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
998
|
+
extra_headers: Headers | None = None,
|
|
999
|
+
extra_query: Query | None = None,
|
|
1000
|
+
extra_body: Body | None = None,
|
|
1001
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1002
|
+
) -> ViewsByOperatingSystem:
|
|
1003
|
+
"""
|
|
1004
|
+
Aggregates the number of views for all client videos, grouping them by device
|
|
1005
|
+
OSs in the built-in player. Note. This method operates only on data collected by
|
|
1006
|
+
the built-in HTML player. It will not show statistics if you are using another
|
|
1007
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
1008
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
1009
|
+
or statistics of the players you have chosen.
|
|
1010
|
+
|
|
1011
|
+
Args:
|
|
1012
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
1013
|
+
|
|
1014
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1015
|
+
|
|
1016
|
+
extra_headers: Send extra headers
|
|
1017
|
+
|
|
1018
|
+
extra_query: Add additional query parameters to the request
|
|
1019
|
+
|
|
1020
|
+
extra_body: Add additional JSON properties to the request
|
|
1021
|
+
|
|
1022
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1023
|
+
"""
|
|
1024
|
+
return self._get(
|
|
1025
|
+
"/streaming/statistics/systems",
|
|
1026
|
+
options=make_request_options(
|
|
1027
|
+
extra_headers=extra_headers,
|
|
1028
|
+
extra_query=extra_query,
|
|
1029
|
+
extra_body=extra_body,
|
|
1030
|
+
timeout=timeout,
|
|
1031
|
+
query=maybe_transform(
|
|
1032
|
+
{
|
|
1033
|
+
"date_from": date_from,
|
|
1034
|
+
"date_to": date_to,
|
|
1035
|
+
},
|
|
1036
|
+
statistic_get_views_by_operating_system_params.StatisticGetViewsByOperatingSystemParams,
|
|
1037
|
+
),
|
|
1038
|
+
),
|
|
1039
|
+
cast_to=ViewsByOperatingSystem,
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
def get_views_by_referer(
|
|
1043
|
+
self,
|
|
1044
|
+
*,
|
|
1045
|
+
date_from: str,
|
|
1046
|
+
date_to: str,
|
|
1047
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1048
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1049
|
+
extra_headers: Headers | None = None,
|
|
1050
|
+
extra_query: Query | None = None,
|
|
1051
|
+
extra_body: Body | None = None,
|
|
1052
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1053
|
+
) -> ViewsByReferer:
|
|
1054
|
+
"""
|
|
1055
|
+
Aggregates the number of views, grouping them by "referer" URL of pages the
|
|
1056
|
+
built-in player was embeded to. Note. This method operates only on data
|
|
1057
|
+
collected by the built-in HTML player. It will not show statistics if you are
|
|
1058
|
+
using another player or viewing in native OS players through direct
|
|
1059
|
+
.m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
|
|
1060
|
+
method /statistics/cdn/uniqs) or statistics of the players you have chosen.
|
|
1061
|
+
|
|
1062
|
+
Args:
|
|
1063
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
1064
|
+
|
|
1065
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1066
|
+
|
|
1067
|
+
extra_headers: Send extra headers
|
|
1068
|
+
|
|
1069
|
+
extra_query: Add additional query parameters to the request
|
|
1070
|
+
|
|
1071
|
+
extra_body: Add additional JSON properties to the request
|
|
1072
|
+
|
|
1073
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1074
|
+
"""
|
|
1075
|
+
return self._get(
|
|
1076
|
+
"/streaming/statistics/embeds",
|
|
1077
|
+
options=make_request_options(
|
|
1078
|
+
extra_headers=extra_headers,
|
|
1079
|
+
extra_query=extra_query,
|
|
1080
|
+
extra_body=extra_body,
|
|
1081
|
+
timeout=timeout,
|
|
1082
|
+
query=maybe_transform(
|
|
1083
|
+
{
|
|
1084
|
+
"date_from": date_from,
|
|
1085
|
+
"date_to": date_to,
|
|
1086
|
+
},
|
|
1087
|
+
statistic_get_views_by_referer_params.StatisticGetViewsByRefererParams,
|
|
1088
|
+
),
|
|
1089
|
+
),
|
|
1090
|
+
cast_to=ViewsByReferer,
|
|
1091
|
+
)
|
|
1092
|
+
|
|
1093
|
+
def get_views_by_region(
|
|
1094
|
+
self,
|
|
1095
|
+
*,
|
|
1096
|
+
date_from: str,
|
|
1097
|
+
date_to: str,
|
|
1098
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1099
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1100
|
+
extra_headers: Headers | None = None,
|
|
1101
|
+
extra_query: Query | None = None,
|
|
1102
|
+
extra_body: Body | None = None,
|
|
1103
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1104
|
+
) -> ViewsByRegion:
|
|
1105
|
+
"""
|
|
1106
|
+
Aggregates the number of views grouping them by regions of countries in the
|
|
1107
|
+
built-in player. Note. This method operates only on data collected by the
|
|
1108
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
1109
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
1110
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
1111
|
+
or statistics of the players you have chosen.
|
|
1112
|
+
|
|
1113
|
+
Args:
|
|
1114
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
1115
|
+
|
|
1116
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1117
|
+
|
|
1118
|
+
extra_headers: Send extra headers
|
|
1119
|
+
|
|
1120
|
+
extra_query: Add additional query parameters to the request
|
|
1121
|
+
|
|
1122
|
+
extra_body: Add additional JSON properties to the request
|
|
1123
|
+
|
|
1124
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1125
|
+
"""
|
|
1126
|
+
return self._get(
|
|
1127
|
+
"/streaming/statistics/regions",
|
|
1128
|
+
options=make_request_options(
|
|
1129
|
+
extra_headers=extra_headers,
|
|
1130
|
+
extra_query=extra_query,
|
|
1131
|
+
extra_body=extra_body,
|
|
1132
|
+
timeout=timeout,
|
|
1133
|
+
query=maybe_transform(
|
|
1134
|
+
{
|
|
1135
|
+
"date_from": date_from,
|
|
1136
|
+
"date_to": date_to,
|
|
1137
|
+
},
|
|
1138
|
+
statistic_get_views_by_region_params.StatisticGetViewsByRegionParams,
|
|
1139
|
+
),
|
|
1140
|
+
),
|
|
1141
|
+
cast_to=ViewsByRegion,
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
def get_views_heatmap(
|
|
1145
|
+
self,
|
|
1146
|
+
*,
|
|
1147
|
+
date_from: str,
|
|
1148
|
+
date_to: str,
|
|
1149
|
+
stream_id: str,
|
|
1150
|
+
type: Literal["live", "vod", "playlist"],
|
|
1151
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1152
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1153
|
+
extra_headers: Headers | None = None,
|
|
1154
|
+
extra_query: Query | None = None,
|
|
1155
|
+
extra_body: Body | None = None,
|
|
1156
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1157
|
+
) -> ViewsHeatmap:
|
|
1158
|
+
"""
|
|
1159
|
+
Shows information about what part of the video your viewers watched in the
|
|
1160
|
+
built-in player. This way you can find out how many viewers started watching the
|
|
1161
|
+
video, and where they stopped watching instead of watching the entire video to
|
|
1162
|
+
the end. Has different format of response depends on query param "type". Note.
|
|
1163
|
+
This method operates only on data collected by the built-in HTML player. It will
|
|
1164
|
+
not show statistics if you are using another player or viewing in native OS
|
|
1165
|
+
players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
|
|
1166
|
+
through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
|
|
1167
|
+
you have chosen.
|
|
1168
|
+
|
|
1169
|
+
Args:
|
|
1170
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
1171
|
+
|
|
1172
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1173
|
+
|
|
1174
|
+
stream_id: video streaming ID
|
|
1175
|
+
|
|
1176
|
+
type: entity's type
|
|
1177
|
+
|
|
1178
|
+
extra_headers: Send extra headers
|
|
1179
|
+
|
|
1180
|
+
extra_query: Add additional query parameters to the request
|
|
1181
|
+
|
|
1182
|
+
extra_body: Add additional JSON properties to the request
|
|
1183
|
+
|
|
1184
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1185
|
+
"""
|
|
1186
|
+
return self._get(
|
|
1187
|
+
"/streaming/statistics/heatmap",
|
|
1188
|
+
options=make_request_options(
|
|
1189
|
+
extra_headers=extra_headers,
|
|
1190
|
+
extra_query=extra_query,
|
|
1191
|
+
extra_body=extra_body,
|
|
1192
|
+
timeout=timeout,
|
|
1193
|
+
query=maybe_transform(
|
|
1194
|
+
{
|
|
1195
|
+
"date_from": date_from,
|
|
1196
|
+
"date_to": date_to,
|
|
1197
|
+
"stream_id": stream_id,
|
|
1198
|
+
"type": type,
|
|
1199
|
+
},
|
|
1200
|
+
statistic_get_views_heatmap_params.StatisticGetViewsHeatmapParams,
|
|
1201
|
+
),
|
|
1202
|
+
),
|
|
1203
|
+
cast_to=ViewsHeatmap,
|
|
1204
|
+
)
|
|
1205
|
+
|
|
1206
|
+
def get_vod_storage_volume(
|
|
1207
|
+
self,
|
|
1208
|
+
*,
|
|
1209
|
+
from_: str,
|
|
1210
|
+
to: str,
|
|
1211
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1212
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1213
|
+
extra_headers: Headers | None = None,
|
|
1214
|
+
extra_query: Query | None = None,
|
|
1215
|
+
extra_body: Body | None = None,
|
|
1216
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1217
|
+
) -> VodStatisticsSeries:
|
|
1218
|
+
"""
|
|
1219
|
+
Calculates time series of the duration in minutes for all processed and
|
|
1220
|
+
undeleted client videos. The data is updated every 8 hours, it does not make
|
|
1221
|
+
sense to set the granulation less than 1 day.
|
|
1222
|
+
|
|
1223
|
+
Args:
|
|
1224
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1225
|
+
|
|
1226
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1227
|
+
|
|
1228
|
+
extra_headers: Send extra headers
|
|
1229
|
+
|
|
1230
|
+
extra_query: Add additional query parameters to the request
|
|
1231
|
+
|
|
1232
|
+
extra_body: Add additional JSON properties to the request
|
|
1233
|
+
|
|
1234
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1235
|
+
"""
|
|
1236
|
+
return self._get(
|
|
1237
|
+
"/streaming/statistics/vod/storage_duration",
|
|
1238
|
+
options=make_request_options(
|
|
1239
|
+
extra_headers=extra_headers,
|
|
1240
|
+
extra_query=extra_query,
|
|
1241
|
+
extra_body=extra_body,
|
|
1242
|
+
timeout=timeout,
|
|
1243
|
+
query=maybe_transform(
|
|
1244
|
+
{
|
|
1245
|
+
"from_": from_,
|
|
1246
|
+
"to": to,
|
|
1247
|
+
},
|
|
1248
|
+
statistic_get_vod_storage_volume_params.StatisticGetVodStorageVolumeParams,
|
|
1249
|
+
),
|
|
1250
|
+
),
|
|
1251
|
+
cast_to=VodStatisticsSeries,
|
|
1252
|
+
)
|
|
1253
|
+
|
|
1254
|
+
def get_vod_transcoding_duration(
|
|
1255
|
+
self,
|
|
1256
|
+
*,
|
|
1257
|
+
from_: str,
|
|
1258
|
+
to: str,
|
|
1259
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1260
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1261
|
+
extra_headers: Headers | None = None,
|
|
1262
|
+
extra_query: Query | None = None,
|
|
1263
|
+
extra_body: Body | None = None,
|
|
1264
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1265
|
+
) -> VodStatisticsSeries:
|
|
1266
|
+
"""
|
|
1267
|
+
Calculates time series of the transcoding time in minutes for all processed
|
|
1268
|
+
client videos. The data is updated every 8 hours, it does not make sense to set
|
|
1269
|
+
the granulation less than 1 day.
|
|
1270
|
+
|
|
1271
|
+
Args:
|
|
1272
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1273
|
+
|
|
1274
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1275
|
+
|
|
1276
|
+
extra_headers: Send extra headers
|
|
1277
|
+
|
|
1278
|
+
extra_query: Add additional query parameters to the request
|
|
1279
|
+
|
|
1280
|
+
extra_body: Add additional JSON properties to the request
|
|
1281
|
+
|
|
1282
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1283
|
+
"""
|
|
1284
|
+
return self._get(
|
|
1285
|
+
"/streaming/statistics/vod/transcoding_duration",
|
|
1286
|
+
options=make_request_options(
|
|
1287
|
+
extra_headers=extra_headers,
|
|
1288
|
+
extra_query=extra_query,
|
|
1289
|
+
extra_body=extra_body,
|
|
1290
|
+
timeout=timeout,
|
|
1291
|
+
query=maybe_transform(
|
|
1292
|
+
{
|
|
1293
|
+
"from_": from_,
|
|
1294
|
+
"to": to,
|
|
1295
|
+
},
|
|
1296
|
+
statistic_get_vod_transcoding_duration_params.StatisticGetVodTranscodingDurationParams,
|
|
1297
|
+
),
|
|
1298
|
+
),
|
|
1299
|
+
cast_to=VodStatisticsSeries,
|
|
1300
|
+
)
|
|
1301
|
+
|
|
1302
|
+
def get_vod_unique_viewers_cdn(
|
|
1303
|
+
self,
|
|
1304
|
+
*,
|
|
1305
|
+
from_: str,
|
|
1306
|
+
to: str,
|
|
1307
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1308
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1309
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
1310
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1311
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1312
|
+
extra_headers: Headers | None = None,
|
|
1313
|
+
extra_query: Query | None = None,
|
|
1314
|
+
extra_body: Body | None = None,
|
|
1315
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1316
|
+
) -> VodStatisticsSeries:
|
|
1317
|
+
"""Calculates time series of unique viewers of VOD via CDN.
|
|
1318
|
+
|
|
1319
|
+
The statistics are
|
|
1320
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
1321
|
+
made with. Works similar to the method `/statistics/cdn/uniqs`. But this allows
|
|
1322
|
+
you to break down data with the specified granularity: minutes, hours, days.
|
|
1323
|
+
Based on this method, a graph of unique views in the Customer Portal is built.
|
|
1324
|
+

|
|
1325
|
+
|
|
1326
|
+
Args:
|
|
1327
|
+
from_: Start of time frame. Format is date time in ISO 8601
|
|
1328
|
+
|
|
1329
|
+
to: End of time frame. Format is date time in ISO 8601
|
|
1330
|
+
|
|
1331
|
+
client_user_id: Filter by user "id"
|
|
1332
|
+
|
|
1333
|
+
granularity: Specifies the time interval for grouping data
|
|
1334
|
+
|
|
1335
|
+
slug: Filter by video "slug"
|
|
1336
|
+
|
|
1337
|
+
extra_headers: Send extra headers
|
|
1338
|
+
|
|
1339
|
+
extra_query: Add additional query parameters to the request
|
|
1340
|
+
|
|
1341
|
+
extra_body: Add additional JSON properties to the request
|
|
1342
|
+
|
|
1343
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1344
|
+
"""
|
|
1345
|
+
return self._get(
|
|
1346
|
+
"/streaming/statistics/vod/viewers",
|
|
1347
|
+
options=make_request_options(
|
|
1348
|
+
extra_headers=extra_headers,
|
|
1349
|
+
extra_query=extra_query,
|
|
1350
|
+
extra_body=extra_body,
|
|
1351
|
+
timeout=timeout,
|
|
1352
|
+
query=maybe_transform(
|
|
1353
|
+
{
|
|
1354
|
+
"from_": from_,
|
|
1355
|
+
"to": to,
|
|
1356
|
+
"client_user_id": client_user_id,
|
|
1357
|
+
"granularity": granularity,
|
|
1358
|
+
"slug": slug,
|
|
1359
|
+
},
|
|
1360
|
+
statistic_get_vod_unique_viewers_cdn_params.StatisticGetVodUniqueViewersCdnParams,
|
|
1361
|
+
),
|
|
1362
|
+
),
|
|
1363
|
+
cast_to=VodStatisticsSeries,
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
def get_vod_watch_time_cdn(
|
|
1367
|
+
self,
|
|
1368
|
+
*,
|
|
1369
|
+
from_: str,
|
|
1370
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1371
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
|
|
1372
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
1373
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
1374
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1375
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1376
|
+
extra_headers: Headers | None = None,
|
|
1377
|
+
extra_query: Query | None = None,
|
|
1378
|
+
extra_body: Body | None = None,
|
|
1379
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1380
|
+
) -> VodStatisticsSeries:
|
|
1381
|
+
"""Calculates a time series of video watching duration in minutes.
|
|
1382
|
+
|
|
1383
|
+
Views of only
|
|
1384
|
+
those videos that meet the specified filters are summed up. The statistics are
|
|
1385
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
1386
|
+
made with. Please note that the result for each time interval is in minutes, it
|
|
1387
|
+
is rounded to the nearest upper integer. You cannot use the sum of all intervals
|
|
1388
|
+
as the total watch time value; instead, use the /total method.
|
|
1389
|
+
|
|
1390
|
+
Args:
|
|
1391
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
1392
|
+
in ISO 8601.
|
|
1393
|
+
|
|
1394
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
1395
|
+
|
|
1396
|
+
granularity: Data is grouped by the specified time interval
|
|
1397
|
+
|
|
1398
|
+
slug: Filter by video's slug
|
|
1399
|
+
|
|
1400
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
1401
|
+
time is taken.
|
|
1402
|
+
|
|
1403
|
+
extra_headers: Send extra headers
|
|
1404
|
+
|
|
1405
|
+
extra_query: Add additional query parameters to the request
|
|
1406
|
+
|
|
1407
|
+
extra_body: Add additional JSON properties to the request
|
|
1408
|
+
|
|
1409
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1410
|
+
"""
|
|
1411
|
+
return self._get(
|
|
1412
|
+
"/streaming/statistics/vod/watching_duration",
|
|
1413
|
+
options=make_request_options(
|
|
1414
|
+
extra_headers=extra_headers,
|
|
1415
|
+
extra_query=extra_query,
|
|
1416
|
+
extra_body=extra_body,
|
|
1417
|
+
timeout=timeout,
|
|
1418
|
+
query=maybe_transform(
|
|
1419
|
+
{
|
|
1420
|
+
"from_": from_,
|
|
1421
|
+
"client_user_id": client_user_id,
|
|
1422
|
+
"granularity": granularity,
|
|
1423
|
+
"slug": slug,
|
|
1424
|
+
"to": to,
|
|
1425
|
+
},
|
|
1426
|
+
statistic_get_vod_watch_time_cdn_params.StatisticGetVodWatchTimeCdnParams,
|
|
1427
|
+
),
|
|
1428
|
+
),
|
|
1429
|
+
cast_to=VodStatisticsSeries,
|
|
1430
|
+
)
|
|
1431
|
+
|
|
1432
|
+
def get_vod_watch_time_total_cdn(
|
|
1433
|
+
self,
|
|
1434
|
+
*,
|
|
1435
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1436
|
+
from_: str | NotGiven = NOT_GIVEN,
|
|
1437
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
1438
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
1439
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1440
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1441
|
+
extra_headers: Headers | None = None,
|
|
1442
|
+
extra_query: Query | None = None,
|
|
1443
|
+
extra_body: Body | None = None,
|
|
1444
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1445
|
+
) -> StatisticGetVodWatchTimeTotalCdnResponse:
|
|
1446
|
+
"""Calculates the total duration of video watching in minutes.
|
|
1447
|
+
|
|
1448
|
+
Views of only those
|
|
1449
|
+
videos that meet the specified filters are summed up. The statistics are taken
|
|
1450
|
+
from the data of CDN and work regardless of which player the views were made
|
|
1451
|
+
with.
|
|
1452
|
+
|
|
1453
|
+
Args:
|
|
1454
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
1455
|
+
|
|
1456
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
1457
|
+
in ISO 8601. If omitted, the earliest start time for viewing is taken
|
|
1458
|
+
|
|
1459
|
+
slug: Filter by video's slug
|
|
1460
|
+
|
|
1461
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
1462
|
+
time is taken
|
|
1463
|
+
|
|
1464
|
+
extra_headers: Send extra headers
|
|
1465
|
+
|
|
1466
|
+
extra_query: Add additional query parameters to the request
|
|
1467
|
+
|
|
1468
|
+
extra_body: Add additional JSON properties to the request
|
|
1469
|
+
|
|
1470
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1471
|
+
"""
|
|
1472
|
+
return self._get(
|
|
1473
|
+
"/streaming/statistics/vod/watching_duration/total",
|
|
1474
|
+
options=make_request_options(
|
|
1475
|
+
extra_headers=extra_headers,
|
|
1476
|
+
extra_query=extra_query,
|
|
1477
|
+
extra_body=extra_body,
|
|
1478
|
+
timeout=timeout,
|
|
1479
|
+
query=maybe_transform(
|
|
1480
|
+
{
|
|
1481
|
+
"client_user_id": client_user_id,
|
|
1482
|
+
"from_": from_,
|
|
1483
|
+
"slug": slug,
|
|
1484
|
+
"to": to,
|
|
1485
|
+
},
|
|
1486
|
+
statistic_get_vod_watch_time_total_cdn_params.StatisticGetVodWatchTimeTotalCdnParams,
|
|
1487
|
+
),
|
|
1488
|
+
),
|
|
1489
|
+
cast_to=StatisticGetVodWatchTimeTotalCdnResponse,
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
class AsyncStatisticsResource(AsyncAPIResource):
|
|
1494
|
+
@cached_property
|
|
1495
|
+
def with_raw_response(self) -> AsyncStatisticsResourceWithRawResponse:
|
|
1496
|
+
"""
|
|
1497
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
1498
|
+
the raw response object instead of the parsed content.
|
|
1499
|
+
|
|
1500
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
1501
|
+
"""
|
|
1502
|
+
return AsyncStatisticsResourceWithRawResponse(self)
|
|
1503
|
+
|
|
1504
|
+
@cached_property
|
|
1505
|
+
def with_streaming_response(self) -> AsyncStatisticsResourceWithStreamingResponse:
|
|
1506
|
+
"""
|
|
1507
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
1508
|
+
|
|
1509
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
1510
|
+
"""
|
|
1511
|
+
return AsyncStatisticsResourceWithStreamingResponse(self)
|
|
1512
|
+
|
|
1513
|
+
async def get_ffprobes(
|
|
1514
|
+
self,
|
|
1515
|
+
*,
|
|
1516
|
+
date_from: str,
|
|
1517
|
+
date_to: str,
|
|
1518
|
+
stream_id: str,
|
|
1519
|
+
interval: int | NotGiven = NOT_GIVEN,
|
|
1520
|
+
units: Literal["second", "minute", "hour", "day", "week", "month"] | NotGiven = NOT_GIVEN,
|
|
1521
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1522
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1523
|
+
extra_headers: Headers | None = None,
|
|
1524
|
+
extra_query: Query | None = None,
|
|
1525
|
+
extra_body: Body | None = None,
|
|
1526
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1527
|
+
) -> Ffprobes:
|
|
1528
|
+
"""
|
|
1529
|
+
Aggregates data for the specified video stream in the specified time interval.
|
|
1530
|
+
"interval" and "units" params working together to point aggregation interval.
|
|
1531
|
+
You can use this method to watch when stream was alive in time, and when it was
|
|
1532
|
+
off.
|
|
1533
|
+
|
|
1534
|
+
Args:
|
|
1535
|
+
date_from: Start of time frame. Format is ISO 8601.
|
|
1536
|
+
|
|
1537
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1538
|
+
|
|
1539
|
+
stream_id: Stream ID
|
|
1540
|
+
|
|
1541
|
+
extra_headers: Send extra headers
|
|
1542
|
+
|
|
1543
|
+
extra_query: Add additional query parameters to the request
|
|
1544
|
+
|
|
1545
|
+
extra_body: Add additional JSON properties to the request
|
|
1546
|
+
|
|
1547
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1548
|
+
"""
|
|
1549
|
+
return await self._get(
|
|
1550
|
+
"/streaming/statistics/ffprobe",
|
|
1551
|
+
options=make_request_options(
|
|
1552
|
+
extra_headers=extra_headers,
|
|
1553
|
+
extra_query=extra_query,
|
|
1554
|
+
extra_body=extra_body,
|
|
1555
|
+
timeout=timeout,
|
|
1556
|
+
query=await async_maybe_transform(
|
|
1557
|
+
{
|
|
1558
|
+
"date_from": date_from,
|
|
1559
|
+
"date_to": date_to,
|
|
1560
|
+
"stream_id": stream_id,
|
|
1561
|
+
"interval": interval,
|
|
1562
|
+
"units": units,
|
|
1563
|
+
},
|
|
1564
|
+
statistic_get_ffprobes_params.StatisticGetFfprobesParams,
|
|
1565
|
+
),
|
|
1566
|
+
),
|
|
1567
|
+
cast_to=Ffprobes,
|
|
1568
|
+
)
|
|
1569
|
+
|
|
1570
|
+
async def get_live_unique_viewers(
|
|
1571
|
+
self,
|
|
1572
|
+
*,
|
|
1573
|
+
from_: str,
|
|
1574
|
+
to: str,
|
|
1575
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1576
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1577
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
1578
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1579
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1580
|
+
extra_headers: Headers | None = None,
|
|
1581
|
+
extra_query: Query | None = None,
|
|
1582
|
+
extra_body: Body | None = None,
|
|
1583
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1584
|
+
) -> StatisticGetLiveUniqueViewersResponse:
|
|
1585
|
+
"""Calculates time series of unique viewers of Live streams via CDN.
|
|
1586
|
+
|
|
1587
|
+
The statistics
|
|
1588
|
+
are taken from the data of CDN and work regardless of which player the views
|
|
1589
|
+
were made with. Works similar to the method `/statistics/cdn/uniqs`. But this
|
|
1590
|
+
allows you to break down data with the specified granularity: minutes, hours,
|
|
1591
|
+
days. Based on this method, a graph of unique views in the Customer Portal is
|
|
1592
|
+
built.
|
|
1593
|
+

|
|
1594
|
+
|
|
1595
|
+
Args:
|
|
1596
|
+
from_: Start of time frame. Format is date time in ISO 8601
|
|
1597
|
+
|
|
1598
|
+
to: End of time frame. Format is date time in ISO 8601
|
|
1599
|
+
|
|
1600
|
+
client_user_id: Filter by "`client_user_id`"
|
|
1601
|
+
|
|
1602
|
+
granularity: Specifies the time interval for grouping data
|
|
1603
|
+
|
|
1604
|
+
stream_id: Filter by "`stream_id`"
|
|
1605
|
+
|
|
1606
|
+
extra_headers: Send extra headers
|
|
1607
|
+
|
|
1608
|
+
extra_query: Add additional query parameters to the request
|
|
1609
|
+
|
|
1610
|
+
extra_body: Add additional JSON properties to the request
|
|
1611
|
+
|
|
1612
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1613
|
+
"""
|
|
1614
|
+
return await self._get(
|
|
1615
|
+
"/streaming/statistics/stream/viewers",
|
|
1616
|
+
options=make_request_options(
|
|
1617
|
+
extra_headers=extra_headers,
|
|
1618
|
+
extra_query=extra_query,
|
|
1619
|
+
extra_body=extra_body,
|
|
1620
|
+
timeout=timeout,
|
|
1621
|
+
query=await async_maybe_transform(
|
|
1622
|
+
{
|
|
1623
|
+
"from_": from_,
|
|
1624
|
+
"to": to,
|
|
1625
|
+
"client_user_id": client_user_id,
|
|
1626
|
+
"granularity": granularity,
|
|
1627
|
+
"stream_id": stream_id,
|
|
1628
|
+
},
|
|
1629
|
+
statistic_get_live_unique_viewers_params.StatisticGetLiveUniqueViewersParams,
|
|
1630
|
+
),
|
|
1631
|
+
),
|
|
1632
|
+
cast_to=StatisticGetLiveUniqueViewersResponse,
|
|
1633
|
+
)
|
|
1634
|
+
|
|
1635
|
+
async def get_live_watch_time_cdn(
|
|
1636
|
+
self,
|
|
1637
|
+
*,
|
|
1638
|
+
from_: str,
|
|
1639
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1640
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
|
|
1641
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
1642
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
1643
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1644
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1645
|
+
extra_headers: Headers | None = None,
|
|
1646
|
+
extra_query: Query | None = None,
|
|
1647
|
+
extra_body: Body | None = None,
|
|
1648
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1649
|
+
) -> StreamSeries:
|
|
1650
|
+
"""Calculates a time series of live streams watching duration in minutes.
|
|
1651
|
+
|
|
1652
|
+
Views of
|
|
1653
|
+
only those streams that meet the specified filters are summed up. The statistics
|
|
1654
|
+
are taken from the data of CDN and work regardless of which player the views
|
|
1655
|
+
were made with. Please note that the result for each time interval is in
|
|
1656
|
+
minutes, it is rounded to the nearest upper integer. You cannot use the sum of
|
|
1657
|
+
all intervals as the total watch time value; instead, use the /total method.
|
|
1658
|
+
|
|
1659
|
+
Args:
|
|
1660
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
1661
|
+
in ISO 8601.
|
|
1662
|
+
|
|
1663
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
1664
|
+
|
|
1665
|
+
granularity: Data is grouped by the specified time interval
|
|
1666
|
+
|
|
1667
|
+
stream_id: Filter by `stream_id`
|
|
1668
|
+
|
|
1669
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
1670
|
+
time is taken
|
|
1671
|
+
|
|
1672
|
+
extra_headers: Send extra headers
|
|
1673
|
+
|
|
1674
|
+
extra_query: Add additional query parameters to the request
|
|
1675
|
+
|
|
1676
|
+
extra_body: Add additional JSON properties to the request
|
|
1677
|
+
|
|
1678
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1679
|
+
"""
|
|
1680
|
+
return await self._get(
|
|
1681
|
+
"/streaming/statistics/stream/watching_duration",
|
|
1682
|
+
options=make_request_options(
|
|
1683
|
+
extra_headers=extra_headers,
|
|
1684
|
+
extra_query=extra_query,
|
|
1685
|
+
extra_body=extra_body,
|
|
1686
|
+
timeout=timeout,
|
|
1687
|
+
query=await async_maybe_transform(
|
|
1688
|
+
{
|
|
1689
|
+
"from_": from_,
|
|
1690
|
+
"client_user_id": client_user_id,
|
|
1691
|
+
"granularity": granularity,
|
|
1692
|
+
"stream_id": stream_id,
|
|
1693
|
+
"to": to,
|
|
1694
|
+
},
|
|
1695
|
+
statistic_get_live_watch_time_cdn_params.StatisticGetLiveWatchTimeCdnParams,
|
|
1696
|
+
),
|
|
1697
|
+
),
|
|
1698
|
+
cast_to=StreamSeries,
|
|
1699
|
+
)
|
|
1700
|
+
|
|
1701
|
+
async def get_live_watch_time_total_cdn(
|
|
1702
|
+
self,
|
|
1703
|
+
*,
|
|
1704
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
1705
|
+
from_: str | NotGiven = NOT_GIVEN,
|
|
1706
|
+
stream_id: int | NotGiven = NOT_GIVEN,
|
|
1707
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
1708
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1709
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1710
|
+
extra_headers: Headers | None = None,
|
|
1711
|
+
extra_query: Query | None = None,
|
|
1712
|
+
extra_body: Body | None = None,
|
|
1713
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1714
|
+
) -> VodTotalStreamDurationSeries:
|
|
1715
|
+
"""Calculates the total duration of live streams watching in minutes.
|
|
1716
|
+
|
|
1717
|
+
Views of only
|
|
1718
|
+
those streams that meet the specified filters are summed up. The statistics are
|
|
1719
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
1720
|
+
made with.
|
|
1721
|
+
|
|
1722
|
+
Args:
|
|
1723
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
1724
|
+
|
|
1725
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
1726
|
+
in ISO 8601. If omitted, the earliest start time for viewing is taken
|
|
1727
|
+
|
|
1728
|
+
stream_id: Filter by `stream_id`
|
|
1729
|
+
|
|
1730
|
+
to: End of time frame. Datetime in ISO 8601 format. If missed, then the current time
|
|
1731
|
+
is taken
|
|
1732
|
+
|
|
1733
|
+
extra_headers: Send extra headers
|
|
1734
|
+
|
|
1735
|
+
extra_query: Add additional query parameters to the request
|
|
1736
|
+
|
|
1737
|
+
extra_body: Add additional JSON properties to the request
|
|
1738
|
+
|
|
1739
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1740
|
+
"""
|
|
1741
|
+
return await self._get(
|
|
1742
|
+
"/streaming/statistics/stream/watching_duration/total",
|
|
1743
|
+
options=make_request_options(
|
|
1744
|
+
extra_headers=extra_headers,
|
|
1745
|
+
extra_query=extra_query,
|
|
1746
|
+
extra_body=extra_body,
|
|
1747
|
+
timeout=timeout,
|
|
1748
|
+
query=await async_maybe_transform(
|
|
1749
|
+
{
|
|
1750
|
+
"client_user_id": client_user_id,
|
|
1751
|
+
"from_": from_,
|
|
1752
|
+
"stream_id": stream_id,
|
|
1753
|
+
"to": to,
|
|
1754
|
+
},
|
|
1755
|
+
statistic_get_live_watch_time_total_cdn_params.StatisticGetLiveWatchTimeTotalCdnParams,
|
|
1756
|
+
),
|
|
1757
|
+
),
|
|
1758
|
+
cast_to=VodTotalStreamDurationSeries,
|
|
1759
|
+
)
|
|
1760
|
+
|
|
1761
|
+
async def get_max_streams_series(
|
|
1762
|
+
self,
|
|
1763
|
+
*,
|
|
1764
|
+
from_: str,
|
|
1765
|
+
to: str,
|
|
1766
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1767
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1768
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1769
|
+
extra_headers: Headers | None = None,
|
|
1770
|
+
extra_query: Query | None = None,
|
|
1771
|
+
extra_body: Body | None = None,
|
|
1772
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1773
|
+
) -> MaxStreamSeries:
|
|
1774
|
+
"""Calculates time series of the amount of simultaneous streams.
|
|
1775
|
+
|
|
1776
|
+
The data is
|
|
1777
|
+
updated near realtime.
|
|
1778
|
+
|
|
1779
|
+
Args:
|
|
1780
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1781
|
+
|
|
1782
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1783
|
+
|
|
1784
|
+
granularity: specifies the time interval for grouping data
|
|
1785
|
+
|
|
1786
|
+
extra_headers: Send extra headers
|
|
1787
|
+
|
|
1788
|
+
extra_query: Add additional query parameters to the request
|
|
1789
|
+
|
|
1790
|
+
extra_body: Add additional JSON properties to the request
|
|
1791
|
+
|
|
1792
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1793
|
+
"""
|
|
1794
|
+
return await self._get(
|
|
1795
|
+
"/streaming/statistics/max_stream",
|
|
1796
|
+
options=make_request_options(
|
|
1797
|
+
extra_headers=extra_headers,
|
|
1798
|
+
extra_query=extra_query,
|
|
1799
|
+
extra_body=extra_body,
|
|
1800
|
+
timeout=timeout,
|
|
1801
|
+
query=await async_maybe_transform(
|
|
1802
|
+
{
|
|
1803
|
+
"from_": from_,
|
|
1804
|
+
"to": to,
|
|
1805
|
+
"granularity": granularity,
|
|
1806
|
+
},
|
|
1807
|
+
statistic_get_max_streams_series_params.StatisticGetMaxStreamsSeriesParams,
|
|
1808
|
+
),
|
|
1809
|
+
),
|
|
1810
|
+
cast_to=MaxStreamSeries,
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
async def get_meet_series(
|
|
1814
|
+
self,
|
|
1815
|
+
*,
|
|
1816
|
+
from_: str,
|
|
1817
|
+
to: str,
|
|
1818
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1819
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1820
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1821
|
+
extra_headers: Headers | None = None,
|
|
1822
|
+
extra_query: Query | None = None,
|
|
1823
|
+
extra_body: Body | None = None,
|
|
1824
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1825
|
+
) -> MeetSeries:
|
|
1826
|
+
"""Calculates time series of the transcoding minutes of all streams.
|
|
1827
|
+
|
|
1828
|
+
The data is
|
|
1829
|
+
updated near realtime.
|
|
1830
|
+
|
|
1831
|
+
Args:
|
|
1832
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1833
|
+
|
|
1834
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1835
|
+
|
|
1836
|
+
granularity: specifies the time interval for grouping data
|
|
1837
|
+
|
|
1838
|
+
extra_headers: Send extra headers
|
|
1839
|
+
|
|
1840
|
+
extra_query: Add additional query parameters to the request
|
|
1841
|
+
|
|
1842
|
+
extra_body: Add additional JSON properties to the request
|
|
1843
|
+
|
|
1844
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1845
|
+
"""
|
|
1846
|
+
return await self._get(
|
|
1847
|
+
"/streaming/statistics/meet",
|
|
1848
|
+
options=make_request_options(
|
|
1849
|
+
extra_headers=extra_headers,
|
|
1850
|
+
extra_query=extra_query,
|
|
1851
|
+
extra_body=extra_body,
|
|
1852
|
+
timeout=timeout,
|
|
1853
|
+
query=await async_maybe_transform(
|
|
1854
|
+
{
|
|
1855
|
+
"from_": from_,
|
|
1856
|
+
"to": to,
|
|
1857
|
+
"granularity": granularity,
|
|
1858
|
+
},
|
|
1859
|
+
statistic_get_meet_series_params.StatisticGetMeetSeriesParams,
|
|
1860
|
+
),
|
|
1861
|
+
),
|
|
1862
|
+
cast_to=MeetSeries,
|
|
1863
|
+
)
|
|
1864
|
+
|
|
1865
|
+
async def get_popular_videos(
|
|
1866
|
+
self,
|
|
1867
|
+
*,
|
|
1868
|
+
date_from: str,
|
|
1869
|
+
date_to: str,
|
|
1870
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1871
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1872
|
+
extra_headers: Headers | None = None,
|
|
1873
|
+
extra_query: Query | None = None,
|
|
1874
|
+
extra_body: Body | None = None,
|
|
1875
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1876
|
+
) -> PopularVideos:
|
|
1877
|
+
"""
|
|
1878
|
+
Aggregates the number of views for all client videos, grouping them by id and
|
|
1879
|
+
sort from most popular to less in the built-in player. Note. This method
|
|
1880
|
+
operates only on data collected by the built-in HTML player. It will not show
|
|
1881
|
+
statistics if you are using another player or viewing in native OS players
|
|
1882
|
+
through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations through
|
|
1883
|
+
CDN (look at method /statistics/cdn/uniqs) or statistics of the players you have
|
|
1884
|
+
chosen.
|
|
1885
|
+
|
|
1886
|
+
Args:
|
|
1887
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
1888
|
+
|
|
1889
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
1890
|
+
|
|
1891
|
+
extra_headers: Send extra headers
|
|
1892
|
+
|
|
1893
|
+
extra_query: Add additional query parameters to the request
|
|
1894
|
+
|
|
1895
|
+
extra_body: Add additional JSON properties to the request
|
|
1896
|
+
|
|
1897
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1898
|
+
"""
|
|
1899
|
+
return await self._get(
|
|
1900
|
+
"/streaming/statistics/popular",
|
|
1901
|
+
options=make_request_options(
|
|
1902
|
+
extra_headers=extra_headers,
|
|
1903
|
+
extra_query=extra_query,
|
|
1904
|
+
extra_body=extra_body,
|
|
1905
|
+
timeout=timeout,
|
|
1906
|
+
query=await async_maybe_transform(
|
|
1907
|
+
{
|
|
1908
|
+
"date_from": date_from,
|
|
1909
|
+
"date_to": date_to,
|
|
1910
|
+
},
|
|
1911
|
+
statistic_get_popular_videos_params.StatisticGetPopularVideosParams,
|
|
1912
|
+
),
|
|
1913
|
+
),
|
|
1914
|
+
cast_to=PopularVideos,
|
|
1915
|
+
)
|
|
1916
|
+
|
|
1917
|
+
async def get_storage_series(
|
|
1918
|
+
self,
|
|
1919
|
+
*,
|
|
1920
|
+
from_: str,
|
|
1921
|
+
to: str,
|
|
1922
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1923
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1924
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1925
|
+
extra_headers: Headers | None = None,
|
|
1926
|
+
extra_query: Query | None = None,
|
|
1927
|
+
extra_body: Body | None = None,
|
|
1928
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1929
|
+
) -> StorageSeries:
|
|
1930
|
+
"""
|
|
1931
|
+
Calculates time series of the size of disk space in bytes for all processed and
|
|
1932
|
+
undeleted client videos. The data is updated every 8 hours, it does not make
|
|
1933
|
+
sense to set the granulation less than 1 day.
|
|
1934
|
+
|
|
1935
|
+
Args:
|
|
1936
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1937
|
+
|
|
1938
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1939
|
+
|
|
1940
|
+
granularity: specifies the time interval for grouping data
|
|
1941
|
+
|
|
1942
|
+
extra_headers: Send extra headers
|
|
1943
|
+
|
|
1944
|
+
extra_query: Add additional query parameters to the request
|
|
1945
|
+
|
|
1946
|
+
extra_body: Add additional JSON properties to the request
|
|
1947
|
+
|
|
1948
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1949
|
+
"""
|
|
1950
|
+
return await self._get(
|
|
1951
|
+
"/streaming/statistics/storage",
|
|
1952
|
+
options=make_request_options(
|
|
1953
|
+
extra_headers=extra_headers,
|
|
1954
|
+
extra_query=extra_query,
|
|
1955
|
+
extra_body=extra_body,
|
|
1956
|
+
timeout=timeout,
|
|
1957
|
+
query=await async_maybe_transform(
|
|
1958
|
+
{
|
|
1959
|
+
"from_": from_,
|
|
1960
|
+
"to": to,
|
|
1961
|
+
"granularity": granularity,
|
|
1962
|
+
},
|
|
1963
|
+
statistic_get_storage_series_params.StatisticGetStorageSeriesParams,
|
|
1964
|
+
),
|
|
1965
|
+
),
|
|
1966
|
+
cast_to=StorageSeries,
|
|
1967
|
+
)
|
|
1968
|
+
|
|
1969
|
+
async def get_stream_series(
|
|
1970
|
+
self,
|
|
1971
|
+
*,
|
|
1972
|
+
from_: str,
|
|
1973
|
+
to: str,
|
|
1974
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
1975
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1976
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1977
|
+
extra_headers: Headers | None = None,
|
|
1978
|
+
extra_query: Query | None = None,
|
|
1979
|
+
extra_body: Body | None = None,
|
|
1980
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1981
|
+
) -> StreamSeries:
|
|
1982
|
+
"""Calculates time series of the transcoding minutes of all streams.
|
|
1983
|
+
|
|
1984
|
+
The data is
|
|
1985
|
+
updated near realtime.
|
|
1986
|
+
|
|
1987
|
+
Args:
|
|
1988
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
1989
|
+
|
|
1990
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
1991
|
+
|
|
1992
|
+
granularity: specifies the time interval for grouping data
|
|
1993
|
+
|
|
1994
|
+
extra_headers: Send extra headers
|
|
1995
|
+
|
|
1996
|
+
extra_query: Add additional query parameters to the request
|
|
1997
|
+
|
|
1998
|
+
extra_body: Add additional JSON properties to the request
|
|
1999
|
+
|
|
2000
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2001
|
+
"""
|
|
2002
|
+
return await self._get(
|
|
2003
|
+
"/streaming/statistics/stream",
|
|
2004
|
+
options=make_request_options(
|
|
2005
|
+
extra_headers=extra_headers,
|
|
2006
|
+
extra_query=extra_query,
|
|
2007
|
+
extra_body=extra_body,
|
|
2008
|
+
timeout=timeout,
|
|
2009
|
+
query=await async_maybe_transform(
|
|
2010
|
+
{
|
|
2011
|
+
"from_": from_,
|
|
2012
|
+
"to": to,
|
|
2013
|
+
"granularity": granularity,
|
|
2014
|
+
},
|
|
2015
|
+
statistic_get_stream_series_params.StatisticGetStreamSeriesParams,
|
|
2016
|
+
),
|
|
2017
|
+
),
|
|
2018
|
+
cast_to=StreamSeries,
|
|
2019
|
+
)
|
|
2020
|
+
|
|
2021
|
+
async def get_unique_viewers(
|
|
2022
|
+
self,
|
|
2023
|
+
*,
|
|
2024
|
+
date_from: str,
|
|
2025
|
+
date_to: str,
|
|
2026
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
2027
|
+
country: str | NotGiven = NOT_GIVEN,
|
|
2028
|
+
event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
|
|
2029
|
+
group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]]
|
|
2030
|
+
| NotGiven = NOT_GIVEN,
|
|
2031
|
+
host: str | NotGiven = NOT_GIVEN,
|
|
2032
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
2033
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2034
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2035
|
+
extra_headers: Headers | None = None,
|
|
2036
|
+
extra_query: Query | None = None,
|
|
2037
|
+
extra_body: Body | None = None,
|
|
2038
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2039
|
+
) -> UniqueViewers:
|
|
2040
|
+
"""Get the number of unique viewers in the built-in player.
|
|
2041
|
+
|
|
2042
|
+
Counts the number of
|
|
2043
|
+
unique IPs. Allows flexible grouping and filtering. The fields in the response
|
|
2044
|
+
depend on the selected grouping. Note. This method operates only on data
|
|
2045
|
+
collected by the built-in HTML player. It will not show statistics if you are
|
|
2046
|
+
using another player or viewing in native OS players through direct
|
|
2047
|
+
.m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
|
|
2048
|
+
method /statistics/cdn/uniqs) or statistics of the players you have chosen.
|
|
2049
|
+
|
|
2050
|
+
Args:
|
|
2051
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2052
|
+
|
|
2053
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2054
|
+
|
|
2055
|
+
id: filter by entity's id
|
|
2056
|
+
|
|
2057
|
+
country: filter by country
|
|
2058
|
+
|
|
2059
|
+
event: filter by event's name
|
|
2060
|
+
|
|
2061
|
+
group: group=1,2,4 OR group=1&group=2&group=3
|
|
2062
|
+
|
|
2063
|
+
host: filter by host
|
|
2064
|
+
|
|
2065
|
+
type: filter by entity's type
|
|
2066
|
+
|
|
2067
|
+
extra_headers: Send extra headers
|
|
2068
|
+
|
|
2069
|
+
extra_query: Add additional query parameters to the request
|
|
2070
|
+
|
|
2071
|
+
extra_body: Add additional JSON properties to the request
|
|
2072
|
+
|
|
2073
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2074
|
+
"""
|
|
2075
|
+
return await self._get(
|
|
2076
|
+
"/streaming/statistics/uniqs",
|
|
2077
|
+
options=make_request_options(
|
|
2078
|
+
extra_headers=extra_headers,
|
|
2079
|
+
extra_query=extra_query,
|
|
2080
|
+
extra_body=extra_body,
|
|
2081
|
+
timeout=timeout,
|
|
2082
|
+
query=await async_maybe_transform(
|
|
2083
|
+
{
|
|
2084
|
+
"date_from": date_from,
|
|
2085
|
+
"date_to": date_to,
|
|
2086
|
+
"id": id,
|
|
2087
|
+
"country": country,
|
|
2088
|
+
"event": event,
|
|
2089
|
+
"group": group,
|
|
2090
|
+
"host": host,
|
|
2091
|
+
"type": type,
|
|
2092
|
+
},
|
|
2093
|
+
statistic_get_unique_viewers_params.StatisticGetUniqueViewersParams,
|
|
2094
|
+
),
|
|
2095
|
+
),
|
|
2096
|
+
cast_to=UniqueViewers,
|
|
2097
|
+
)
|
|
2098
|
+
|
|
2099
|
+
async def get_unique_viewers_cdn(
|
|
2100
|
+
self,
|
|
2101
|
+
*,
|
|
2102
|
+
date_from: str,
|
|
2103
|
+
date_to: str,
|
|
2104
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
2105
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
2106
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2107
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2108
|
+
extra_headers: Headers | None = None,
|
|
2109
|
+
extra_query: Query | None = None,
|
|
2110
|
+
extra_body: Body | None = None,
|
|
2111
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2112
|
+
) -> UniqueViewersCdn:
|
|
2113
|
+
"""Сounts the number of unique viewers of a video entity over CDN.
|
|
2114
|
+
|
|
2115
|
+
It doesn't
|
|
2116
|
+
matter what player you used. All unique viewers for the specified period of time
|
|
2117
|
+
are counted. **How does it work?** Calculating the number of unique viewers for
|
|
2118
|
+
a Live stream or VOD over CDN involves aggregating and analyzing various metrics
|
|
2119
|
+
to ensure each individual viewer is counted only once, regardless of how many
|
|
2120
|
+
times they connect or disconnect during the stream. This method provides
|
|
2121
|
+
statistics for any video viewing by unique users, regardless of viewing method
|
|
2122
|
+
and a player you used. Thus, this is the most important difference from viewing
|
|
2123
|
+
through the built-in player:
|
|
2124
|
+
|
|
2125
|
+
- In method /statistics/uniqs viewers of the built-in player are tracked only.
|
|
2126
|
+
- But this method tracks all viewers from everywhere. This method is a
|
|
2127
|
+
combination of two other Live and VOD detailed methods. If you need detailed
|
|
2128
|
+
information, then see the methods: `/statistics/stream/viewers` and
|
|
2129
|
+
`/statistics/vod/viewers`. **Data Processing and Deduplication** We us IP
|
|
2130
|
+
Address & User-Agent combination. Each unique combination of IP address and
|
|
2131
|
+
User-Agent string might be considered a unique viewer. This approach allows to
|
|
2132
|
+
accurately estimate the number of unique viewers. However, this is not
|
|
2133
|
+
foolproof due to NAT (Network Address Translation) and shared networks. Thus
|
|
2134
|
+
if your users fall under such restrictions, then the number of unique viewers
|
|
2135
|
+
may be higher than calculated. **Why is there no "Unique Views" method?**
|
|
2136
|
+
Based on CDN data, we can calculate the number of unique viewers only. Thus
|
|
2137
|
+
only your player will be able to count the number of unique views (clicks on
|
|
2138
|
+
the Play button) within the player session (i.e. how many times 1 unique
|
|
2139
|
+
viewer clicked the Play button within a unique player's session).
|
|
2140
|
+
|
|
2141
|
+
Args:
|
|
2142
|
+
date_from: Start of time frame. Format is date time in ISO 8601.
|
|
2143
|
+
|
|
2144
|
+
date_to: End of time frame. Format is date time in ISO 8601.
|
|
2145
|
+
|
|
2146
|
+
id: Filter by entity's id. Put ID of a Live stream, VOD or a playlist to be
|
|
2147
|
+
calculated. If the value is omitted, then the calculation is done for all
|
|
2148
|
+
videos/streams of the specified type. When using this "id" parameter, be sure to
|
|
2149
|
+
specify the "type" parameter too. If you do not specify a type, the "id" will be
|
|
2150
|
+
ignored.
|
|
2151
|
+
|
|
2152
|
+
type: Filter by entity's type
|
|
2153
|
+
|
|
2154
|
+
extra_headers: Send extra headers
|
|
2155
|
+
|
|
2156
|
+
extra_query: Add additional query parameters to the request
|
|
2157
|
+
|
|
2158
|
+
extra_body: Add additional JSON properties to the request
|
|
2159
|
+
|
|
2160
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2161
|
+
"""
|
|
2162
|
+
return await self._get(
|
|
2163
|
+
"/streaming/statistics/cdn/uniqs",
|
|
2164
|
+
options=make_request_options(
|
|
2165
|
+
extra_headers=extra_headers,
|
|
2166
|
+
extra_query=extra_query,
|
|
2167
|
+
extra_body=extra_body,
|
|
2168
|
+
timeout=timeout,
|
|
2169
|
+
query=await async_maybe_transform(
|
|
2170
|
+
{
|
|
2171
|
+
"date_from": date_from,
|
|
2172
|
+
"date_to": date_to,
|
|
2173
|
+
"id": id,
|
|
2174
|
+
"type": type,
|
|
2175
|
+
},
|
|
2176
|
+
statistic_get_unique_viewers_cdn_params.StatisticGetUniqueViewersCdnParams,
|
|
2177
|
+
),
|
|
2178
|
+
),
|
|
2179
|
+
cast_to=UniqueViewersCdn,
|
|
2180
|
+
)
|
|
2181
|
+
|
|
2182
|
+
async def get_views(
|
|
2183
|
+
self,
|
|
2184
|
+
*,
|
|
2185
|
+
date_from: str,
|
|
2186
|
+
date_to: str,
|
|
2187
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
2188
|
+
country: str | NotGiven = NOT_GIVEN,
|
|
2189
|
+
event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
|
|
2190
|
+
group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]]
|
|
2191
|
+
| NotGiven = NOT_GIVEN,
|
|
2192
|
+
host: str | NotGiven = NOT_GIVEN,
|
|
2193
|
+
type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
|
|
2194
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2195
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2196
|
+
extra_headers: Headers | None = None,
|
|
2197
|
+
extra_query: Query | None = None,
|
|
2198
|
+
extra_body: Body | None = None,
|
|
2199
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2200
|
+
) -> Views:
|
|
2201
|
+
"""Get the number of views in the built-in player.
|
|
2202
|
+
|
|
2203
|
+
Allows flexible grouping and
|
|
2204
|
+
filtering. The fields in the response depend on the selected grouping. Note.
|
|
2205
|
+
This method operates only on data collected by the built-in HTML player. It will
|
|
2206
|
+
not show statistics if you are using another player or viewing in native OS
|
|
2207
|
+
players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
|
|
2208
|
+
through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
|
|
2209
|
+
you have chosen.
|
|
2210
|
+
|
|
2211
|
+
Args:
|
|
2212
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2213
|
+
|
|
2214
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2215
|
+
|
|
2216
|
+
id: filter by entity's id
|
|
2217
|
+
|
|
2218
|
+
country: filter by country
|
|
2219
|
+
|
|
2220
|
+
event: filter by event's name
|
|
2221
|
+
|
|
2222
|
+
group: group=1,2,4 OR group=1&group=2&group=3
|
|
2223
|
+
|
|
2224
|
+
host: filter by host
|
|
2225
|
+
|
|
2226
|
+
type: filter by entity's type
|
|
2227
|
+
|
|
2228
|
+
extra_headers: Send extra headers
|
|
2229
|
+
|
|
2230
|
+
extra_query: Add additional query parameters to the request
|
|
2231
|
+
|
|
2232
|
+
extra_body: Add additional JSON properties to the request
|
|
2233
|
+
|
|
2234
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2235
|
+
"""
|
|
2236
|
+
return await self._get(
|
|
2237
|
+
"/streaming/statistics/views",
|
|
2238
|
+
options=make_request_options(
|
|
2239
|
+
extra_headers=extra_headers,
|
|
2240
|
+
extra_query=extra_query,
|
|
2241
|
+
extra_body=extra_body,
|
|
2242
|
+
timeout=timeout,
|
|
2243
|
+
query=await async_maybe_transform(
|
|
2244
|
+
{
|
|
2245
|
+
"date_from": date_from,
|
|
2246
|
+
"date_to": date_to,
|
|
2247
|
+
"id": id,
|
|
2248
|
+
"country": country,
|
|
2249
|
+
"event": event,
|
|
2250
|
+
"group": group,
|
|
2251
|
+
"host": host,
|
|
2252
|
+
"type": type,
|
|
2253
|
+
},
|
|
2254
|
+
statistic_get_views_params.StatisticGetViewsParams,
|
|
2255
|
+
),
|
|
2256
|
+
),
|
|
2257
|
+
cast_to=Views,
|
|
2258
|
+
)
|
|
2259
|
+
|
|
2260
|
+
async def get_views_by_browsers(
|
|
2261
|
+
self,
|
|
2262
|
+
*,
|
|
2263
|
+
date_from: str,
|
|
2264
|
+
date_to: str,
|
|
2265
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2266
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2267
|
+
extra_headers: Headers | None = None,
|
|
2268
|
+
extra_query: Query | None = None,
|
|
2269
|
+
extra_body: Body | None = None,
|
|
2270
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2271
|
+
) -> ViewsByBrowser:
|
|
2272
|
+
"""
|
|
2273
|
+
Aggregates the number of views for all client videos, grouping them by browsers
|
|
2274
|
+
in the built-in player. Note. This method operates only on data collected by the
|
|
2275
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
2276
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
2277
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
2278
|
+
or statistics of the players you have chosen.
|
|
2279
|
+
|
|
2280
|
+
Args:
|
|
2281
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2282
|
+
|
|
2283
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2284
|
+
|
|
2285
|
+
extra_headers: Send extra headers
|
|
2286
|
+
|
|
2287
|
+
extra_query: Add additional query parameters to the request
|
|
2288
|
+
|
|
2289
|
+
extra_body: Add additional JSON properties to the request
|
|
2290
|
+
|
|
2291
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2292
|
+
"""
|
|
2293
|
+
return await self._get(
|
|
2294
|
+
"/streaming/statistics/browsers",
|
|
2295
|
+
options=make_request_options(
|
|
2296
|
+
extra_headers=extra_headers,
|
|
2297
|
+
extra_query=extra_query,
|
|
2298
|
+
extra_body=extra_body,
|
|
2299
|
+
timeout=timeout,
|
|
2300
|
+
query=await async_maybe_transform(
|
|
2301
|
+
{
|
|
2302
|
+
"date_from": date_from,
|
|
2303
|
+
"date_to": date_to,
|
|
2304
|
+
},
|
|
2305
|
+
statistic_get_views_by_browsers_params.StatisticGetViewsByBrowsersParams,
|
|
2306
|
+
),
|
|
2307
|
+
),
|
|
2308
|
+
cast_to=ViewsByBrowser,
|
|
2309
|
+
)
|
|
2310
|
+
|
|
2311
|
+
async def get_views_by_country(
|
|
2312
|
+
self,
|
|
2313
|
+
*,
|
|
2314
|
+
date_from: str,
|
|
2315
|
+
date_to: str,
|
|
2316
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2317
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2318
|
+
extra_headers: Headers | None = None,
|
|
2319
|
+
extra_query: Query | None = None,
|
|
2320
|
+
extra_body: Body | None = None,
|
|
2321
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2322
|
+
) -> ViewsByCountry:
|
|
2323
|
+
"""
|
|
2324
|
+
Aggregates the number of views grouping them by country in the built-in player.
|
|
2325
|
+
Note. This method operates only on data collected by the built-in HTML player.
|
|
2326
|
+
It will not show statistics if you are using another player or viewing in native
|
|
2327
|
+
OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
|
|
2328
|
+
calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
|
|
2329
|
+
the players you have chosen.
|
|
2330
|
+
|
|
2331
|
+
Args:
|
|
2332
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2333
|
+
|
|
2334
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2335
|
+
|
|
2336
|
+
extra_headers: Send extra headers
|
|
2337
|
+
|
|
2338
|
+
extra_query: Add additional query parameters to the request
|
|
2339
|
+
|
|
2340
|
+
extra_body: Add additional JSON properties to the request
|
|
2341
|
+
|
|
2342
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2343
|
+
"""
|
|
2344
|
+
return await self._get(
|
|
2345
|
+
"/streaming/statistics/countries",
|
|
2346
|
+
options=make_request_options(
|
|
2347
|
+
extra_headers=extra_headers,
|
|
2348
|
+
extra_query=extra_query,
|
|
2349
|
+
extra_body=extra_body,
|
|
2350
|
+
timeout=timeout,
|
|
2351
|
+
query=await async_maybe_transform(
|
|
2352
|
+
{
|
|
2353
|
+
"date_from": date_from,
|
|
2354
|
+
"date_to": date_to,
|
|
2355
|
+
},
|
|
2356
|
+
statistic_get_views_by_country_params.StatisticGetViewsByCountryParams,
|
|
2357
|
+
),
|
|
2358
|
+
),
|
|
2359
|
+
cast_to=ViewsByCountry,
|
|
2360
|
+
)
|
|
2361
|
+
|
|
2362
|
+
async def get_views_by_hostname(
|
|
2363
|
+
self,
|
|
2364
|
+
*,
|
|
2365
|
+
date_from: str,
|
|
2366
|
+
date_to: str,
|
|
2367
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2368
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2369
|
+
extra_headers: Headers | None = None,
|
|
2370
|
+
extra_query: Query | None = None,
|
|
2371
|
+
extra_body: Body | None = None,
|
|
2372
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2373
|
+
) -> ViewsByHostname:
|
|
2374
|
+
"""
|
|
2375
|
+
Aggregates the number of views, grouping them by "host" domain name the built-in
|
|
2376
|
+
player was embeded to. Note. This method operates only on data collected by the
|
|
2377
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
2378
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
2379
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
2380
|
+
or statistics of the players you have chosen.
|
|
2381
|
+
|
|
2382
|
+
Args:
|
|
2383
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2384
|
+
|
|
2385
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2386
|
+
|
|
2387
|
+
extra_headers: Send extra headers
|
|
2388
|
+
|
|
2389
|
+
extra_query: Add additional query parameters to the request
|
|
2390
|
+
|
|
2391
|
+
extra_body: Add additional JSON properties to the request
|
|
2392
|
+
|
|
2393
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2394
|
+
"""
|
|
2395
|
+
return await self._get(
|
|
2396
|
+
"/streaming/statistics/hosts",
|
|
2397
|
+
options=make_request_options(
|
|
2398
|
+
extra_headers=extra_headers,
|
|
2399
|
+
extra_query=extra_query,
|
|
2400
|
+
extra_body=extra_body,
|
|
2401
|
+
timeout=timeout,
|
|
2402
|
+
query=await async_maybe_transform(
|
|
2403
|
+
{
|
|
2404
|
+
"date_from": date_from,
|
|
2405
|
+
"date_to": date_to,
|
|
2406
|
+
},
|
|
2407
|
+
statistic_get_views_by_hostname_params.StatisticGetViewsByHostnameParams,
|
|
2408
|
+
),
|
|
2409
|
+
),
|
|
2410
|
+
cast_to=ViewsByHostname,
|
|
2411
|
+
)
|
|
2412
|
+
|
|
2413
|
+
async def get_views_by_operating_system(
|
|
2414
|
+
self,
|
|
2415
|
+
*,
|
|
2416
|
+
date_from: str,
|
|
2417
|
+
date_to: str,
|
|
2418
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2419
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2420
|
+
extra_headers: Headers | None = None,
|
|
2421
|
+
extra_query: Query | None = None,
|
|
2422
|
+
extra_body: Body | None = None,
|
|
2423
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2424
|
+
) -> ViewsByOperatingSystem:
|
|
2425
|
+
"""
|
|
2426
|
+
Aggregates the number of views for all client videos, grouping them by device
|
|
2427
|
+
OSs in the built-in player. Note. This method operates only on data collected by
|
|
2428
|
+
the built-in HTML player. It will not show statistics if you are using another
|
|
2429
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
2430
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
2431
|
+
or statistics of the players you have chosen.
|
|
2432
|
+
|
|
2433
|
+
Args:
|
|
2434
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2435
|
+
|
|
2436
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2437
|
+
|
|
2438
|
+
extra_headers: Send extra headers
|
|
2439
|
+
|
|
2440
|
+
extra_query: Add additional query parameters to the request
|
|
2441
|
+
|
|
2442
|
+
extra_body: Add additional JSON properties to the request
|
|
2443
|
+
|
|
2444
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2445
|
+
"""
|
|
2446
|
+
return await self._get(
|
|
2447
|
+
"/streaming/statistics/systems",
|
|
2448
|
+
options=make_request_options(
|
|
2449
|
+
extra_headers=extra_headers,
|
|
2450
|
+
extra_query=extra_query,
|
|
2451
|
+
extra_body=extra_body,
|
|
2452
|
+
timeout=timeout,
|
|
2453
|
+
query=await async_maybe_transform(
|
|
2454
|
+
{
|
|
2455
|
+
"date_from": date_from,
|
|
2456
|
+
"date_to": date_to,
|
|
2457
|
+
},
|
|
2458
|
+
statistic_get_views_by_operating_system_params.StatisticGetViewsByOperatingSystemParams,
|
|
2459
|
+
),
|
|
2460
|
+
),
|
|
2461
|
+
cast_to=ViewsByOperatingSystem,
|
|
2462
|
+
)
|
|
2463
|
+
|
|
2464
|
+
async def get_views_by_referer(
|
|
2465
|
+
self,
|
|
2466
|
+
*,
|
|
2467
|
+
date_from: str,
|
|
2468
|
+
date_to: str,
|
|
2469
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2470
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2471
|
+
extra_headers: Headers | None = None,
|
|
2472
|
+
extra_query: Query | None = None,
|
|
2473
|
+
extra_body: Body | None = None,
|
|
2474
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2475
|
+
) -> ViewsByReferer:
|
|
2476
|
+
"""
|
|
2477
|
+
Aggregates the number of views, grouping them by "referer" URL of pages the
|
|
2478
|
+
built-in player was embeded to. Note. This method operates only on data
|
|
2479
|
+
collected by the built-in HTML player. It will not show statistics if you are
|
|
2480
|
+
using another player or viewing in native OS players through direct
|
|
2481
|
+
.m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
|
|
2482
|
+
method /statistics/cdn/uniqs) or statistics of the players you have chosen.
|
|
2483
|
+
|
|
2484
|
+
Args:
|
|
2485
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2486
|
+
|
|
2487
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2488
|
+
|
|
2489
|
+
extra_headers: Send extra headers
|
|
2490
|
+
|
|
2491
|
+
extra_query: Add additional query parameters to the request
|
|
2492
|
+
|
|
2493
|
+
extra_body: Add additional JSON properties to the request
|
|
2494
|
+
|
|
2495
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2496
|
+
"""
|
|
2497
|
+
return await self._get(
|
|
2498
|
+
"/streaming/statistics/embeds",
|
|
2499
|
+
options=make_request_options(
|
|
2500
|
+
extra_headers=extra_headers,
|
|
2501
|
+
extra_query=extra_query,
|
|
2502
|
+
extra_body=extra_body,
|
|
2503
|
+
timeout=timeout,
|
|
2504
|
+
query=await async_maybe_transform(
|
|
2505
|
+
{
|
|
2506
|
+
"date_from": date_from,
|
|
2507
|
+
"date_to": date_to,
|
|
2508
|
+
},
|
|
2509
|
+
statistic_get_views_by_referer_params.StatisticGetViewsByRefererParams,
|
|
2510
|
+
),
|
|
2511
|
+
),
|
|
2512
|
+
cast_to=ViewsByReferer,
|
|
2513
|
+
)
|
|
2514
|
+
|
|
2515
|
+
async def get_views_by_region(
|
|
2516
|
+
self,
|
|
2517
|
+
*,
|
|
2518
|
+
date_from: str,
|
|
2519
|
+
date_to: str,
|
|
2520
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2521
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2522
|
+
extra_headers: Headers | None = None,
|
|
2523
|
+
extra_query: Query | None = None,
|
|
2524
|
+
extra_body: Body | None = None,
|
|
2525
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2526
|
+
) -> ViewsByRegion:
|
|
2527
|
+
"""
|
|
2528
|
+
Aggregates the number of views grouping them by regions of countries in the
|
|
2529
|
+
built-in player. Note. This method operates only on data collected by the
|
|
2530
|
+
built-in HTML player. It will not show statistics if you are using another
|
|
2531
|
+
player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
|
|
2532
|
+
such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
|
|
2533
|
+
or statistics of the players you have chosen.
|
|
2534
|
+
|
|
2535
|
+
Args:
|
|
2536
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2537
|
+
|
|
2538
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2539
|
+
|
|
2540
|
+
extra_headers: Send extra headers
|
|
2541
|
+
|
|
2542
|
+
extra_query: Add additional query parameters to the request
|
|
2543
|
+
|
|
2544
|
+
extra_body: Add additional JSON properties to the request
|
|
2545
|
+
|
|
2546
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2547
|
+
"""
|
|
2548
|
+
return await self._get(
|
|
2549
|
+
"/streaming/statistics/regions",
|
|
2550
|
+
options=make_request_options(
|
|
2551
|
+
extra_headers=extra_headers,
|
|
2552
|
+
extra_query=extra_query,
|
|
2553
|
+
extra_body=extra_body,
|
|
2554
|
+
timeout=timeout,
|
|
2555
|
+
query=await async_maybe_transform(
|
|
2556
|
+
{
|
|
2557
|
+
"date_from": date_from,
|
|
2558
|
+
"date_to": date_to,
|
|
2559
|
+
},
|
|
2560
|
+
statistic_get_views_by_region_params.StatisticGetViewsByRegionParams,
|
|
2561
|
+
),
|
|
2562
|
+
),
|
|
2563
|
+
cast_to=ViewsByRegion,
|
|
2564
|
+
)
|
|
2565
|
+
|
|
2566
|
+
async def get_views_heatmap(
|
|
2567
|
+
self,
|
|
2568
|
+
*,
|
|
2569
|
+
date_from: str,
|
|
2570
|
+
date_to: str,
|
|
2571
|
+
stream_id: str,
|
|
2572
|
+
type: Literal["live", "vod", "playlist"],
|
|
2573
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2574
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2575
|
+
extra_headers: Headers | None = None,
|
|
2576
|
+
extra_query: Query | None = None,
|
|
2577
|
+
extra_body: Body | None = None,
|
|
2578
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2579
|
+
) -> ViewsHeatmap:
|
|
2580
|
+
"""
|
|
2581
|
+
Shows information about what part of the video your viewers watched in the
|
|
2582
|
+
built-in player. This way you can find out how many viewers started watching the
|
|
2583
|
+
video, and where they stopped watching instead of watching the entire video to
|
|
2584
|
+
the end. Has different format of response depends on query param "type". Note.
|
|
2585
|
+
This method operates only on data collected by the built-in HTML player. It will
|
|
2586
|
+
not show statistics if you are using another player or viewing in native OS
|
|
2587
|
+
players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
|
|
2588
|
+
through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
|
|
2589
|
+
you have chosen.
|
|
2590
|
+
|
|
2591
|
+
Args:
|
|
2592
|
+
date_from: Start of time frame. Datetime in ISO 8601 format.
|
|
2593
|
+
|
|
2594
|
+
date_to: End of time frame. Datetime in ISO 8601 format.
|
|
2595
|
+
|
|
2596
|
+
stream_id: video streaming ID
|
|
2597
|
+
|
|
2598
|
+
type: entity's type
|
|
2599
|
+
|
|
2600
|
+
extra_headers: Send extra headers
|
|
2601
|
+
|
|
2602
|
+
extra_query: Add additional query parameters to the request
|
|
2603
|
+
|
|
2604
|
+
extra_body: Add additional JSON properties to the request
|
|
2605
|
+
|
|
2606
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2607
|
+
"""
|
|
2608
|
+
return await self._get(
|
|
2609
|
+
"/streaming/statistics/heatmap",
|
|
2610
|
+
options=make_request_options(
|
|
2611
|
+
extra_headers=extra_headers,
|
|
2612
|
+
extra_query=extra_query,
|
|
2613
|
+
extra_body=extra_body,
|
|
2614
|
+
timeout=timeout,
|
|
2615
|
+
query=await async_maybe_transform(
|
|
2616
|
+
{
|
|
2617
|
+
"date_from": date_from,
|
|
2618
|
+
"date_to": date_to,
|
|
2619
|
+
"stream_id": stream_id,
|
|
2620
|
+
"type": type,
|
|
2621
|
+
},
|
|
2622
|
+
statistic_get_views_heatmap_params.StatisticGetViewsHeatmapParams,
|
|
2623
|
+
),
|
|
2624
|
+
),
|
|
2625
|
+
cast_to=ViewsHeatmap,
|
|
2626
|
+
)
|
|
2627
|
+
|
|
2628
|
+
async def get_vod_storage_volume(
|
|
2629
|
+
self,
|
|
2630
|
+
*,
|
|
2631
|
+
from_: str,
|
|
2632
|
+
to: str,
|
|
2633
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2634
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2635
|
+
extra_headers: Headers | None = None,
|
|
2636
|
+
extra_query: Query | None = None,
|
|
2637
|
+
extra_body: Body | None = None,
|
|
2638
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2639
|
+
) -> VodStatisticsSeries:
|
|
2640
|
+
"""
|
|
2641
|
+
Calculates time series of the duration in minutes for all processed and
|
|
2642
|
+
undeleted client videos. The data is updated every 8 hours, it does not make
|
|
2643
|
+
sense to set the granulation less than 1 day.
|
|
2644
|
+
|
|
2645
|
+
Args:
|
|
2646
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
2647
|
+
|
|
2648
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
2649
|
+
|
|
2650
|
+
extra_headers: Send extra headers
|
|
2651
|
+
|
|
2652
|
+
extra_query: Add additional query parameters to the request
|
|
2653
|
+
|
|
2654
|
+
extra_body: Add additional JSON properties to the request
|
|
2655
|
+
|
|
2656
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2657
|
+
"""
|
|
2658
|
+
return await self._get(
|
|
2659
|
+
"/streaming/statistics/vod/storage_duration",
|
|
2660
|
+
options=make_request_options(
|
|
2661
|
+
extra_headers=extra_headers,
|
|
2662
|
+
extra_query=extra_query,
|
|
2663
|
+
extra_body=extra_body,
|
|
2664
|
+
timeout=timeout,
|
|
2665
|
+
query=await async_maybe_transform(
|
|
2666
|
+
{
|
|
2667
|
+
"from_": from_,
|
|
2668
|
+
"to": to,
|
|
2669
|
+
},
|
|
2670
|
+
statistic_get_vod_storage_volume_params.StatisticGetVodStorageVolumeParams,
|
|
2671
|
+
),
|
|
2672
|
+
),
|
|
2673
|
+
cast_to=VodStatisticsSeries,
|
|
2674
|
+
)
|
|
2675
|
+
|
|
2676
|
+
async def get_vod_transcoding_duration(
|
|
2677
|
+
self,
|
|
2678
|
+
*,
|
|
2679
|
+
from_: str,
|
|
2680
|
+
to: str,
|
|
2681
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2682
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2683
|
+
extra_headers: Headers | None = None,
|
|
2684
|
+
extra_query: Query | None = None,
|
|
2685
|
+
extra_body: Body | None = None,
|
|
2686
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2687
|
+
) -> VodStatisticsSeries:
|
|
2688
|
+
"""
|
|
2689
|
+
Calculates time series of the transcoding time in minutes for all processed
|
|
2690
|
+
client videos. The data is updated every 8 hours, it does not make sense to set
|
|
2691
|
+
the granulation less than 1 day.
|
|
2692
|
+
|
|
2693
|
+
Args:
|
|
2694
|
+
from_: Start of time frame. Datetime in ISO 8601 format.
|
|
2695
|
+
|
|
2696
|
+
to: End of time frame. Datetime in ISO 8601 format.
|
|
2697
|
+
|
|
2698
|
+
extra_headers: Send extra headers
|
|
2699
|
+
|
|
2700
|
+
extra_query: Add additional query parameters to the request
|
|
2701
|
+
|
|
2702
|
+
extra_body: Add additional JSON properties to the request
|
|
2703
|
+
|
|
2704
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2705
|
+
"""
|
|
2706
|
+
return await self._get(
|
|
2707
|
+
"/streaming/statistics/vod/transcoding_duration",
|
|
2708
|
+
options=make_request_options(
|
|
2709
|
+
extra_headers=extra_headers,
|
|
2710
|
+
extra_query=extra_query,
|
|
2711
|
+
extra_body=extra_body,
|
|
2712
|
+
timeout=timeout,
|
|
2713
|
+
query=await async_maybe_transform(
|
|
2714
|
+
{
|
|
2715
|
+
"from_": from_,
|
|
2716
|
+
"to": to,
|
|
2717
|
+
},
|
|
2718
|
+
statistic_get_vod_transcoding_duration_params.StatisticGetVodTranscodingDurationParams,
|
|
2719
|
+
),
|
|
2720
|
+
),
|
|
2721
|
+
cast_to=VodStatisticsSeries,
|
|
2722
|
+
)
|
|
2723
|
+
|
|
2724
|
+
async def get_vod_unique_viewers_cdn(
|
|
2725
|
+
self,
|
|
2726
|
+
*,
|
|
2727
|
+
from_: str,
|
|
2728
|
+
to: str,
|
|
2729
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
2730
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
|
|
2731
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
2732
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2733
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2734
|
+
extra_headers: Headers | None = None,
|
|
2735
|
+
extra_query: Query | None = None,
|
|
2736
|
+
extra_body: Body | None = None,
|
|
2737
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2738
|
+
) -> VodStatisticsSeries:
|
|
2739
|
+
"""Calculates time series of unique viewers of VOD via CDN.
|
|
2740
|
+
|
|
2741
|
+
The statistics are
|
|
2742
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
2743
|
+
made with. Works similar to the method `/statistics/cdn/uniqs`. But this allows
|
|
2744
|
+
you to break down data with the specified granularity: minutes, hours, days.
|
|
2745
|
+
Based on this method, a graph of unique views in the Customer Portal is built.
|
|
2746
|
+

|
|
2747
|
+
|
|
2748
|
+
Args:
|
|
2749
|
+
from_: Start of time frame. Format is date time in ISO 8601
|
|
2750
|
+
|
|
2751
|
+
to: End of time frame. Format is date time in ISO 8601
|
|
2752
|
+
|
|
2753
|
+
client_user_id: Filter by user "id"
|
|
2754
|
+
|
|
2755
|
+
granularity: Specifies the time interval for grouping data
|
|
2756
|
+
|
|
2757
|
+
slug: Filter by video "slug"
|
|
2758
|
+
|
|
2759
|
+
extra_headers: Send extra headers
|
|
2760
|
+
|
|
2761
|
+
extra_query: Add additional query parameters to the request
|
|
2762
|
+
|
|
2763
|
+
extra_body: Add additional JSON properties to the request
|
|
2764
|
+
|
|
2765
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2766
|
+
"""
|
|
2767
|
+
return await self._get(
|
|
2768
|
+
"/streaming/statistics/vod/viewers",
|
|
2769
|
+
options=make_request_options(
|
|
2770
|
+
extra_headers=extra_headers,
|
|
2771
|
+
extra_query=extra_query,
|
|
2772
|
+
extra_body=extra_body,
|
|
2773
|
+
timeout=timeout,
|
|
2774
|
+
query=await async_maybe_transform(
|
|
2775
|
+
{
|
|
2776
|
+
"from_": from_,
|
|
2777
|
+
"to": to,
|
|
2778
|
+
"client_user_id": client_user_id,
|
|
2779
|
+
"granularity": granularity,
|
|
2780
|
+
"slug": slug,
|
|
2781
|
+
},
|
|
2782
|
+
statistic_get_vod_unique_viewers_cdn_params.StatisticGetVodUniqueViewersCdnParams,
|
|
2783
|
+
),
|
|
2784
|
+
),
|
|
2785
|
+
cast_to=VodStatisticsSeries,
|
|
2786
|
+
)
|
|
2787
|
+
|
|
2788
|
+
async def get_vod_watch_time_cdn(
|
|
2789
|
+
self,
|
|
2790
|
+
*,
|
|
2791
|
+
from_: str,
|
|
2792
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
2793
|
+
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
|
|
2794
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
2795
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
2796
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2797
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2798
|
+
extra_headers: Headers | None = None,
|
|
2799
|
+
extra_query: Query | None = None,
|
|
2800
|
+
extra_body: Body | None = None,
|
|
2801
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2802
|
+
) -> VodStatisticsSeries:
|
|
2803
|
+
"""Calculates a time series of video watching duration in minutes.
|
|
2804
|
+
|
|
2805
|
+
Views of only
|
|
2806
|
+
those videos that meet the specified filters are summed up. The statistics are
|
|
2807
|
+
taken from the data of CDN and work regardless of which player the views were
|
|
2808
|
+
made with. Please note that the result for each time interval is in minutes, it
|
|
2809
|
+
is rounded to the nearest upper integer. You cannot use the sum of all intervals
|
|
2810
|
+
as the total watch time value; instead, use the /total method.
|
|
2811
|
+
|
|
2812
|
+
Args:
|
|
2813
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
2814
|
+
in ISO 8601.
|
|
2815
|
+
|
|
2816
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
2817
|
+
|
|
2818
|
+
granularity: Data is grouped by the specified time interval
|
|
2819
|
+
|
|
2820
|
+
slug: Filter by video's slug
|
|
2821
|
+
|
|
2822
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
2823
|
+
time is taken.
|
|
2824
|
+
|
|
2825
|
+
extra_headers: Send extra headers
|
|
2826
|
+
|
|
2827
|
+
extra_query: Add additional query parameters to the request
|
|
2828
|
+
|
|
2829
|
+
extra_body: Add additional JSON properties to the request
|
|
2830
|
+
|
|
2831
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2832
|
+
"""
|
|
2833
|
+
return await self._get(
|
|
2834
|
+
"/streaming/statistics/vod/watching_duration",
|
|
2835
|
+
options=make_request_options(
|
|
2836
|
+
extra_headers=extra_headers,
|
|
2837
|
+
extra_query=extra_query,
|
|
2838
|
+
extra_body=extra_body,
|
|
2839
|
+
timeout=timeout,
|
|
2840
|
+
query=await async_maybe_transform(
|
|
2841
|
+
{
|
|
2842
|
+
"from_": from_,
|
|
2843
|
+
"client_user_id": client_user_id,
|
|
2844
|
+
"granularity": granularity,
|
|
2845
|
+
"slug": slug,
|
|
2846
|
+
"to": to,
|
|
2847
|
+
},
|
|
2848
|
+
statistic_get_vod_watch_time_cdn_params.StatisticGetVodWatchTimeCdnParams,
|
|
2849
|
+
),
|
|
2850
|
+
),
|
|
2851
|
+
cast_to=VodStatisticsSeries,
|
|
2852
|
+
)
|
|
2853
|
+
|
|
2854
|
+
async def get_vod_watch_time_total_cdn(
|
|
2855
|
+
self,
|
|
2856
|
+
*,
|
|
2857
|
+
client_user_id: int | NotGiven = NOT_GIVEN,
|
|
2858
|
+
from_: str | NotGiven = NOT_GIVEN,
|
|
2859
|
+
slug: str | NotGiven = NOT_GIVEN,
|
|
2860
|
+
to: str | NotGiven = NOT_GIVEN,
|
|
2861
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2862
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2863
|
+
extra_headers: Headers | None = None,
|
|
2864
|
+
extra_query: Query | None = None,
|
|
2865
|
+
extra_body: Body | None = None,
|
|
2866
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2867
|
+
) -> StatisticGetVodWatchTimeTotalCdnResponse:
|
|
2868
|
+
"""Calculates the total duration of video watching in minutes.
|
|
2869
|
+
|
|
2870
|
+
Views of only those
|
|
2871
|
+
videos that meet the specified filters are summed up. The statistics are taken
|
|
2872
|
+
from the data of CDN and work regardless of which player the views were made
|
|
2873
|
+
with.
|
|
2874
|
+
|
|
2875
|
+
Args:
|
|
2876
|
+
client_user_id: Filter by field "`client_user_id`"
|
|
2877
|
+
|
|
2878
|
+
from_: Start of the time period for counting minutes of watching. Format is date time
|
|
2879
|
+
in ISO 8601. If omitted, the earliest start time for viewing is taken
|
|
2880
|
+
|
|
2881
|
+
slug: Filter by video's slug
|
|
2882
|
+
|
|
2883
|
+
to: End of time frame. Datetime in ISO 8601 format. If omitted, then the current
|
|
2884
|
+
time is taken
|
|
2885
|
+
|
|
2886
|
+
extra_headers: Send extra headers
|
|
2887
|
+
|
|
2888
|
+
extra_query: Add additional query parameters to the request
|
|
2889
|
+
|
|
2890
|
+
extra_body: Add additional JSON properties to the request
|
|
2891
|
+
|
|
2892
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
2893
|
+
"""
|
|
2894
|
+
return await self._get(
|
|
2895
|
+
"/streaming/statistics/vod/watching_duration/total",
|
|
2896
|
+
options=make_request_options(
|
|
2897
|
+
extra_headers=extra_headers,
|
|
2898
|
+
extra_query=extra_query,
|
|
2899
|
+
extra_body=extra_body,
|
|
2900
|
+
timeout=timeout,
|
|
2901
|
+
query=await async_maybe_transform(
|
|
2902
|
+
{
|
|
2903
|
+
"client_user_id": client_user_id,
|
|
2904
|
+
"from_": from_,
|
|
2905
|
+
"slug": slug,
|
|
2906
|
+
"to": to,
|
|
2907
|
+
},
|
|
2908
|
+
statistic_get_vod_watch_time_total_cdn_params.StatisticGetVodWatchTimeTotalCdnParams,
|
|
2909
|
+
),
|
|
2910
|
+
),
|
|
2911
|
+
cast_to=StatisticGetVodWatchTimeTotalCdnResponse,
|
|
2912
|
+
)
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
class StatisticsResourceWithRawResponse:
|
|
2916
|
+
def __init__(self, statistics: StatisticsResource) -> None:
|
|
2917
|
+
self._statistics = statistics
|
|
2918
|
+
|
|
2919
|
+
self.get_ffprobes = to_raw_response_wrapper(
|
|
2920
|
+
statistics.get_ffprobes,
|
|
2921
|
+
)
|
|
2922
|
+
self.get_live_unique_viewers = to_raw_response_wrapper(
|
|
2923
|
+
statistics.get_live_unique_viewers,
|
|
2924
|
+
)
|
|
2925
|
+
self.get_live_watch_time_cdn = to_raw_response_wrapper(
|
|
2926
|
+
statistics.get_live_watch_time_cdn,
|
|
2927
|
+
)
|
|
2928
|
+
self.get_live_watch_time_total_cdn = to_raw_response_wrapper(
|
|
2929
|
+
statistics.get_live_watch_time_total_cdn,
|
|
2930
|
+
)
|
|
2931
|
+
self.get_max_streams_series = to_raw_response_wrapper(
|
|
2932
|
+
statistics.get_max_streams_series,
|
|
2933
|
+
)
|
|
2934
|
+
self.get_meet_series = to_raw_response_wrapper(
|
|
2935
|
+
statistics.get_meet_series,
|
|
2936
|
+
)
|
|
2937
|
+
self.get_popular_videos = to_raw_response_wrapper(
|
|
2938
|
+
statistics.get_popular_videos,
|
|
2939
|
+
)
|
|
2940
|
+
self.get_storage_series = to_raw_response_wrapper(
|
|
2941
|
+
statistics.get_storage_series,
|
|
2942
|
+
)
|
|
2943
|
+
self.get_stream_series = to_raw_response_wrapper(
|
|
2944
|
+
statistics.get_stream_series,
|
|
2945
|
+
)
|
|
2946
|
+
self.get_unique_viewers = to_raw_response_wrapper(
|
|
2947
|
+
statistics.get_unique_viewers,
|
|
2948
|
+
)
|
|
2949
|
+
self.get_unique_viewers_cdn = to_raw_response_wrapper(
|
|
2950
|
+
statistics.get_unique_viewers_cdn,
|
|
2951
|
+
)
|
|
2952
|
+
self.get_views = to_raw_response_wrapper(
|
|
2953
|
+
statistics.get_views,
|
|
2954
|
+
)
|
|
2955
|
+
self.get_views_by_browsers = to_raw_response_wrapper(
|
|
2956
|
+
statistics.get_views_by_browsers,
|
|
2957
|
+
)
|
|
2958
|
+
self.get_views_by_country = to_raw_response_wrapper(
|
|
2959
|
+
statistics.get_views_by_country,
|
|
2960
|
+
)
|
|
2961
|
+
self.get_views_by_hostname = to_raw_response_wrapper(
|
|
2962
|
+
statistics.get_views_by_hostname,
|
|
2963
|
+
)
|
|
2964
|
+
self.get_views_by_operating_system = to_raw_response_wrapper(
|
|
2965
|
+
statistics.get_views_by_operating_system,
|
|
2966
|
+
)
|
|
2967
|
+
self.get_views_by_referer = to_raw_response_wrapper(
|
|
2968
|
+
statistics.get_views_by_referer,
|
|
2969
|
+
)
|
|
2970
|
+
self.get_views_by_region = to_raw_response_wrapper(
|
|
2971
|
+
statistics.get_views_by_region,
|
|
2972
|
+
)
|
|
2973
|
+
self.get_views_heatmap = to_raw_response_wrapper(
|
|
2974
|
+
statistics.get_views_heatmap,
|
|
2975
|
+
)
|
|
2976
|
+
self.get_vod_storage_volume = to_raw_response_wrapper(
|
|
2977
|
+
statistics.get_vod_storage_volume,
|
|
2978
|
+
)
|
|
2979
|
+
self.get_vod_transcoding_duration = to_raw_response_wrapper(
|
|
2980
|
+
statistics.get_vod_transcoding_duration,
|
|
2981
|
+
)
|
|
2982
|
+
self.get_vod_unique_viewers_cdn = to_raw_response_wrapper(
|
|
2983
|
+
statistics.get_vod_unique_viewers_cdn,
|
|
2984
|
+
)
|
|
2985
|
+
self.get_vod_watch_time_cdn = to_raw_response_wrapper(
|
|
2986
|
+
statistics.get_vod_watch_time_cdn,
|
|
2987
|
+
)
|
|
2988
|
+
self.get_vod_watch_time_total_cdn = to_raw_response_wrapper(
|
|
2989
|
+
statistics.get_vod_watch_time_total_cdn,
|
|
2990
|
+
)
|
|
2991
|
+
|
|
2992
|
+
|
|
2993
|
+
class AsyncStatisticsResourceWithRawResponse:
|
|
2994
|
+
def __init__(self, statistics: AsyncStatisticsResource) -> None:
|
|
2995
|
+
self._statistics = statistics
|
|
2996
|
+
|
|
2997
|
+
self.get_ffprobes = async_to_raw_response_wrapper(
|
|
2998
|
+
statistics.get_ffprobes,
|
|
2999
|
+
)
|
|
3000
|
+
self.get_live_unique_viewers = async_to_raw_response_wrapper(
|
|
3001
|
+
statistics.get_live_unique_viewers,
|
|
3002
|
+
)
|
|
3003
|
+
self.get_live_watch_time_cdn = async_to_raw_response_wrapper(
|
|
3004
|
+
statistics.get_live_watch_time_cdn,
|
|
3005
|
+
)
|
|
3006
|
+
self.get_live_watch_time_total_cdn = async_to_raw_response_wrapper(
|
|
3007
|
+
statistics.get_live_watch_time_total_cdn,
|
|
3008
|
+
)
|
|
3009
|
+
self.get_max_streams_series = async_to_raw_response_wrapper(
|
|
3010
|
+
statistics.get_max_streams_series,
|
|
3011
|
+
)
|
|
3012
|
+
self.get_meet_series = async_to_raw_response_wrapper(
|
|
3013
|
+
statistics.get_meet_series,
|
|
3014
|
+
)
|
|
3015
|
+
self.get_popular_videos = async_to_raw_response_wrapper(
|
|
3016
|
+
statistics.get_popular_videos,
|
|
3017
|
+
)
|
|
3018
|
+
self.get_storage_series = async_to_raw_response_wrapper(
|
|
3019
|
+
statistics.get_storage_series,
|
|
3020
|
+
)
|
|
3021
|
+
self.get_stream_series = async_to_raw_response_wrapper(
|
|
3022
|
+
statistics.get_stream_series,
|
|
3023
|
+
)
|
|
3024
|
+
self.get_unique_viewers = async_to_raw_response_wrapper(
|
|
3025
|
+
statistics.get_unique_viewers,
|
|
3026
|
+
)
|
|
3027
|
+
self.get_unique_viewers_cdn = async_to_raw_response_wrapper(
|
|
3028
|
+
statistics.get_unique_viewers_cdn,
|
|
3029
|
+
)
|
|
3030
|
+
self.get_views = async_to_raw_response_wrapper(
|
|
3031
|
+
statistics.get_views,
|
|
3032
|
+
)
|
|
3033
|
+
self.get_views_by_browsers = async_to_raw_response_wrapper(
|
|
3034
|
+
statistics.get_views_by_browsers,
|
|
3035
|
+
)
|
|
3036
|
+
self.get_views_by_country = async_to_raw_response_wrapper(
|
|
3037
|
+
statistics.get_views_by_country,
|
|
3038
|
+
)
|
|
3039
|
+
self.get_views_by_hostname = async_to_raw_response_wrapper(
|
|
3040
|
+
statistics.get_views_by_hostname,
|
|
3041
|
+
)
|
|
3042
|
+
self.get_views_by_operating_system = async_to_raw_response_wrapper(
|
|
3043
|
+
statistics.get_views_by_operating_system,
|
|
3044
|
+
)
|
|
3045
|
+
self.get_views_by_referer = async_to_raw_response_wrapper(
|
|
3046
|
+
statistics.get_views_by_referer,
|
|
3047
|
+
)
|
|
3048
|
+
self.get_views_by_region = async_to_raw_response_wrapper(
|
|
3049
|
+
statistics.get_views_by_region,
|
|
3050
|
+
)
|
|
3051
|
+
self.get_views_heatmap = async_to_raw_response_wrapper(
|
|
3052
|
+
statistics.get_views_heatmap,
|
|
3053
|
+
)
|
|
3054
|
+
self.get_vod_storage_volume = async_to_raw_response_wrapper(
|
|
3055
|
+
statistics.get_vod_storage_volume,
|
|
3056
|
+
)
|
|
3057
|
+
self.get_vod_transcoding_duration = async_to_raw_response_wrapper(
|
|
3058
|
+
statistics.get_vod_transcoding_duration,
|
|
3059
|
+
)
|
|
3060
|
+
self.get_vod_unique_viewers_cdn = async_to_raw_response_wrapper(
|
|
3061
|
+
statistics.get_vod_unique_viewers_cdn,
|
|
3062
|
+
)
|
|
3063
|
+
self.get_vod_watch_time_cdn = async_to_raw_response_wrapper(
|
|
3064
|
+
statistics.get_vod_watch_time_cdn,
|
|
3065
|
+
)
|
|
3066
|
+
self.get_vod_watch_time_total_cdn = async_to_raw_response_wrapper(
|
|
3067
|
+
statistics.get_vod_watch_time_total_cdn,
|
|
3068
|
+
)
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
class StatisticsResourceWithStreamingResponse:
|
|
3072
|
+
def __init__(self, statistics: StatisticsResource) -> None:
|
|
3073
|
+
self._statistics = statistics
|
|
3074
|
+
|
|
3075
|
+
self.get_ffprobes = to_streamed_response_wrapper(
|
|
3076
|
+
statistics.get_ffprobes,
|
|
3077
|
+
)
|
|
3078
|
+
self.get_live_unique_viewers = to_streamed_response_wrapper(
|
|
3079
|
+
statistics.get_live_unique_viewers,
|
|
3080
|
+
)
|
|
3081
|
+
self.get_live_watch_time_cdn = to_streamed_response_wrapper(
|
|
3082
|
+
statistics.get_live_watch_time_cdn,
|
|
3083
|
+
)
|
|
3084
|
+
self.get_live_watch_time_total_cdn = to_streamed_response_wrapper(
|
|
3085
|
+
statistics.get_live_watch_time_total_cdn,
|
|
3086
|
+
)
|
|
3087
|
+
self.get_max_streams_series = to_streamed_response_wrapper(
|
|
3088
|
+
statistics.get_max_streams_series,
|
|
3089
|
+
)
|
|
3090
|
+
self.get_meet_series = to_streamed_response_wrapper(
|
|
3091
|
+
statistics.get_meet_series,
|
|
3092
|
+
)
|
|
3093
|
+
self.get_popular_videos = to_streamed_response_wrapper(
|
|
3094
|
+
statistics.get_popular_videos,
|
|
3095
|
+
)
|
|
3096
|
+
self.get_storage_series = to_streamed_response_wrapper(
|
|
3097
|
+
statistics.get_storage_series,
|
|
3098
|
+
)
|
|
3099
|
+
self.get_stream_series = to_streamed_response_wrapper(
|
|
3100
|
+
statistics.get_stream_series,
|
|
3101
|
+
)
|
|
3102
|
+
self.get_unique_viewers = to_streamed_response_wrapper(
|
|
3103
|
+
statistics.get_unique_viewers,
|
|
3104
|
+
)
|
|
3105
|
+
self.get_unique_viewers_cdn = to_streamed_response_wrapper(
|
|
3106
|
+
statistics.get_unique_viewers_cdn,
|
|
3107
|
+
)
|
|
3108
|
+
self.get_views = to_streamed_response_wrapper(
|
|
3109
|
+
statistics.get_views,
|
|
3110
|
+
)
|
|
3111
|
+
self.get_views_by_browsers = to_streamed_response_wrapper(
|
|
3112
|
+
statistics.get_views_by_browsers,
|
|
3113
|
+
)
|
|
3114
|
+
self.get_views_by_country = to_streamed_response_wrapper(
|
|
3115
|
+
statistics.get_views_by_country,
|
|
3116
|
+
)
|
|
3117
|
+
self.get_views_by_hostname = to_streamed_response_wrapper(
|
|
3118
|
+
statistics.get_views_by_hostname,
|
|
3119
|
+
)
|
|
3120
|
+
self.get_views_by_operating_system = to_streamed_response_wrapper(
|
|
3121
|
+
statistics.get_views_by_operating_system,
|
|
3122
|
+
)
|
|
3123
|
+
self.get_views_by_referer = to_streamed_response_wrapper(
|
|
3124
|
+
statistics.get_views_by_referer,
|
|
3125
|
+
)
|
|
3126
|
+
self.get_views_by_region = to_streamed_response_wrapper(
|
|
3127
|
+
statistics.get_views_by_region,
|
|
3128
|
+
)
|
|
3129
|
+
self.get_views_heatmap = to_streamed_response_wrapper(
|
|
3130
|
+
statistics.get_views_heatmap,
|
|
3131
|
+
)
|
|
3132
|
+
self.get_vod_storage_volume = to_streamed_response_wrapper(
|
|
3133
|
+
statistics.get_vod_storage_volume,
|
|
3134
|
+
)
|
|
3135
|
+
self.get_vod_transcoding_duration = to_streamed_response_wrapper(
|
|
3136
|
+
statistics.get_vod_transcoding_duration,
|
|
3137
|
+
)
|
|
3138
|
+
self.get_vod_unique_viewers_cdn = to_streamed_response_wrapper(
|
|
3139
|
+
statistics.get_vod_unique_viewers_cdn,
|
|
3140
|
+
)
|
|
3141
|
+
self.get_vod_watch_time_cdn = to_streamed_response_wrapper(
|
|
3142
|
+
statistics.get_vod_watch_time_cdn,
|
|
3143
|
+
)
|
|
3144
|
+
self.get_vod_watch_time_total_cdn = to_streamed_response_wrapper(
|
|
3145
|
+
statistics.get_vod_watch_time_total_cdn,
|
|
3146
|
+
)
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
class AsyncStatisticsResourceWithStreamingResponse:
|
|
3150
|
+
def __init__(self, statistics: AsyncStatisticsResource) -> None:
|
|
3151
|
+
self._statistics = statistics
|
|
3152
|
+
|
|
3153
|
+
self.get_ffprobes = async_to_streamed_response_wrapper(
|
|
3154
|
+
statistics.get_ffprobes,
|
|
3155
|
+
)
|
|
3156
|
+
self.get_live_unique_viewers = async_to_streamed_response_wrapper(
|
|
3157
|
+
statistics.get_live_unique_viewers,
|
|
3158
|
+
)
|
|
3159
|
+
self.get_live_watch_time_cdn = async_to_streamed_response_wrapper(
|
|
3160
|
+
statistics.get_live_watch_time_cdn,
|
|
3161
|
+
)
|
|
3162
|
+
self.get_live_watch_time_total_cdn = async_to_streamed_response_wrapper(
|
|
3163
|
+
statistics.get_live_watch_time_total_cdn,
|
|
3164
|
+
)
|
|
3165
|
+
self.get_max_streams_series = async_to_streamed_response_wrapper(
|
|
3166
|
+
statistics.get_max_streams_series,
|
|
3167
|
+
)
|
|
3168
|
+
self.get_meet_series = async_to_streamed_response_wrapper(
|
|
3169
|
+
statistics.get_meet_series,
|
|
3170
|
+
)
|
|
3171
|
+
self.get_popular_videos = async_to_streamed_response_wrapper(
|
|
3172
|
+
statistics.get_popular_videos,
|
|
3173
|
+
)
|
|
3174
|
+
self.get_storage_series = async_to_streamed_response_wrapper(
|
|
3175
|
+
statistics.get_storage_series,
|
|
3176
|
+
)
|
|
3177
|
+
self.get_stream_series = async_to_streamed_response_wrapper(
|
|
3178
|
+
statistics.get_stream_series,
|
|
3179
|
+
)
|
|
3180
|
+
self.get_unique_viewers = async_to_streamed_response_wrapper(
|
|
3181
|
+
statistics.get_unique_viewers,
|
|
3182
|
+
)
|
|
3183
|
+
self.get_unique_viewers_cdn = async_to_streamed_response_wrapper(
|
|
3184
|
+
statistics.get_unique_viewers_cdn,
|
|
3185
|
+
)
|
|
3186
|
+
self.get_views = async_to_streamed_response_wrapper(
|
|
3187
|
+
statistics.get_views,
|
|
3188
|
+
)
|
|
3189
|
+
self.get_views_by_browsers = async_to_streamed_response_wrapper(
|
|
3190
|
+
statistics.get_views_by_browsers,
|
|
3191
|
+
)
|
|
3192
|
+
self.get_views_by_country = async_to_streamed_response_wrapper(
|
|
3193
|
+
statistics.get_views_by_country,
|
|
3194
|
+
)
|
|
3195
|
+
self.get_views_by_hostname = async_to_streamed_response_wrapper(
|
|
3196
|
+
statistics.get_views_by_hostname,
|
|
3197
|
+
)
|
|
3198
|
+
self.get_views_by_operating_system = async_to_streamed_response_wrapper(
|
|
3199
|
+
statistics.get_views_by_operating_system,
|
|
3200
|
+
)
|
|
3201
|
+
self.get_views_by_referer = async_to_streamed_response_wrapper(
|
|
3202
|
+
statistics.get_views_by_referer,
|
|
3203
|
+
)
|
|
3204
|
+
self.get_views_by_region = async_to_streamed_response_wrapper(
|
|
3205
|
+
statistics.get_views_by_region,
|
|
3206
|
+
)
|
|
3207
|
+
self.get_views_heatmap = async_to_streamed_response_wrapper(
|
|
3208
|
+
statistics.get_views_heatmap,
|
|
3209
|
+
)
|
|
3210
|
+
self.get_vod_storage_volume = async_to_streamed_response_wrapper(
|
|
3211
|
+
statistics.get_vod_storage_volume,
|
|
3212
|
+
)
|
|
3213
|
+
self.get_vod_transcoding_duration = async_to_streamed_response_wrapper(
|
|
3214
|
+
statistics.get_vod_transcoding_duration,
|
|
3215
|
+
)
|
|
3216
|
+
self.get_vod_unique_viewers_cdn = async_to_streamed_response_wrapper(
|
|
3217
|
+
statistics.get_vod_unique_viewers_cdn,
|
|
3218
|
+
)
|
|
3219
|
+
self.get_vod_watch_time_cdn = async_to_streamed_response_wrapper(
|
|
3220
|
+
statistics.get_vod_watch_time_cdn,
|
|
3221
|
+
)
|
|
3222
|
+
self.get_vod_watch_time_total_cdn = async_to_streamed_response_wrapper(
|
|
3223
|
+
statistics.get_vod_watch_time_total_cdn,
|
|
3224
|
+
)
|