gcore 0.13.0__py3-none-any.whl → 0.14.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.

Files changed (334) hide show
  1. gcore/__init__.py +3 -1
  2. gcore/_base_client.py +9 -9
  3. gcore/_client.py +25 -10
  4. gcore/_models.py +10 -4
  5. gcore/_qs.py +7 -7
  6. gcore/_types.py +18 -11
  7. gcore/_utils/_transform.py +2 -2
  8. gcore/_utils/_utils.py +4 -4
  9. gcore/_version.py +1 -1
  10. gcore/pagination.py +137 -0
  11. gcore/resources/__init__.py +14 -0
  12. gcore/resources/cdn/__init__.py +201 -0
  13. gcore/resources/cdn/audit_log.py +406 -0
  14. gcore/resources/cdn/cdn.py +957 -0
  15. gcore/resources/cdn/certificates.py +1062 -0
  16. gcore/resources/cdn/ip_ranges.py +224 -0
  17. gcore/resources/cdn/logs/__init__.py +33 -0
  18. gcore/resources/cdn/logs/logs.py +1424 -0
  19. gcore/resources/cdn/logs/settings.py +1081 -0
  20. gcore/resources/cdn/logs_uploader/__init__.py +61 -0
  21. gcore/resources/cdn/logs_uploader/configs.py +868 -0
  22. gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
  23. gcore/resources/cdn/logs_uploader/policies.py +1060 -0
  24. gcore/resources/cdn/logs_uploader/targets.py +811 -0
  25. gcore/resources/cdn/metrics.py +419 -0
  26. gcore/resources/cdn/network_capacity.py +139 -0
  27. gcore/resources/cdn/origin_groups.py +1496 -0
  28. gcore/resources/cdn/resources/__init__.py +47 -0
  29. gcore/resources/cdn/resources/resources.py +2060 -0
  30. gcore/resources/cdn/resources/rules.py +1027 -0
  31. gcore/resources/cdn/resources/shield.py +259 -0
  32. gcore/resources/cdn/rule_templates.py +883 -0
  33. gcore/resources/cdn/shields.py +139 -0
  34. gcore/resources/cdn/statistics.py +1408 -0
  35. gcore/resources/cdn/trusted_ca_certificates.py +592 -0
  36. gcore/resources/cloud/audit_logs.py +33 -29
  37. gcore/resources/cloud/baremetal/flavors.py +21 -17
  38. gcore/resources/cloud/baremetal/images.py +19 -15
  39. gcore/resources/cloud/baremetal/servers.py +141 -119
  40. gcore/resources/cloud/billing_reservations.py +41 -33
  41. gcore/resources/cloud/cloud.py +24 -0
  42. gcore/resources/cloud/cost_reports.py +149 -119
  43. gcore/resources/cloud/file_shares/access_rules.py +25 -13
  44. gcore/resources/cloud/file_shares/file_shares.py +107 -71
  45. gcore/resources/cloud/floating_ips.py +101 -59
  46. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
  47. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
  48. gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
  49. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
  50. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
  51. gcore/resources/cloud/inference/api_keys.py +51 -31
  52. gcore/resources/cloud/inference/applications/deployments.py +49 -31
  53. gcore/resources/cloud/inference/applications/templates.py +17 -9
  54. gcore/resources/cloud/inference/deployments/deployments.py +171 -139
  55. gcore/resources/cloud/inference/deployments/logs.py +17 -13
  56. gcore/resources/cloud/inference/flavors.py +21 -13
  57. gcore/resources/cloud/inference/inference.py +9 -5
  58. gcore/resources/cloud/inference/registry_credentials.py +45 -25
  59. gcore/resources/cloud/inference/secrets.py +45 -25
  60. gcore/resources/cloud/instances/flavors.py +17 -13
  61. gcore/resources/cloud/instances/images.py +153 -129
  62. gcore/resources/cloud/instances/instances.py +287 -213
  63. gcore/resources/cloud/instances/interfaces.py +165 -161
  64. gcore/resources/cloud/instances/metrics.py +9 -5
  65. gcore/resources/cloud/ip_ranges.py +25 -15
  66. gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
  67. gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
  68. gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
  69. gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
  70. gcore/resources/cloud/k8s/flavors.py +13 -9
  71. gcore/resources/cloud/k8s/k8s.py +9 -5
  72. gcore/resources/cloud/load_balancers/flavors.py +11 -7
  73. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
  74. gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
  75. gcore/resources/cloud/load_balancers/listeners.py +125 -105
  76. gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
  77. gcore/resources/cloud/load_balancers/metrics.py +9 -5
  78. gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
  79. gcore/resources/cloud/load_balancers/pools/members.py +31 -23
  80. gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
  81. gcore/resources/cloud/load_balancers/statuses.py +17 -9
  82. gcore/resources/cloud/networks/networks.py +79 -55
  83. gcore/resources/cloud/networks/routers.py +75 -47
  84. gcore/resources/cloud/networks/subnets.py +105 -81
  85. gcore/resources/cloud/placement_groups.py +33 -17
  86. gcore/resources/cloud/projects.py +53 -41
  87. gcore/resources/cloud/quotas/quotas.py +25 -13
  88. gcore/resources/cloud/quotas/requests.py +41 -25
  89. gcore/resources/cloud/regions.py +25 -23
  90. gcore/resources/cloud/registries/artifacts.py +17 -9
  91. gcore/resources/cloud/registries/registries.py +55 -29
  92. gcore/resources/cloud/registries/repositories.py +17 -9
  93. gcore/resources/cloud/registries/tags.py +9 -5
  94. gcore/resources/cloud/registries/users.py +65 -35
  95. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +123 -107
  96. gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
  97. gcore/resources/cloud/secrets.py +43 -27
  98. gcore/resources/cloud/security_groups/rules.py +55 -43
  99. gcore/resources/cloud/security_groups/security_groups.py +79 -47
  100. gcore/resources/cloud/ssh_keys.py +51 -31
  101. gcore/resources/cloud/tasks.py +57 -45
  102. gcore/resources/cloud/usage_reports.py +27 -23
  103. gcore/resources/cloud/users/role_assignments.py +49 -33
  104. gcore/resources/cloud/volumes.py +237 -201
  105. gcore/resources/dns/dns.py +17 -13
  106. gcore/resources/dns/locations.py +29 -17
  107. gcore/resources/dns/metrics.py +13 -9
  108. gcore/resources/dns/pickers/pickers.py +5 -5
  109. gcore/resources/dns/pickers/presets.py +9 -5
  110. gcore/resources/dns/zones/dnssec.py +19 -11
  111. gcore/resources/dns/zones/rrsets.py +149 -91
  112. gcore/resources/dns/zones/zones.py +245 -187
  113. gcore/resources/fastedge/apps/apps.py +105 -89
  114. gcore/resources/fastedge/apps/logs.py +25 -21
  115. gcore/resources/fastedge/binaries.py +33 -17
  116. gcore/resources/fastedge/fastedge.py +5 -5
  117. gcore/resources/fastedge/kv_stores.py +43 -31
  118. gcore/resources/fastedge/secrets.py +69 -45
  119. gcore/resources/fastedge/statistics.py +25 -17
  120. gcore/resources/fastedge/templates.py +59 -39
  121. gcore/resources/iam/api_tokens.py +43 -27
  122. gcore/resources/iam/iam.py +5 -5
  123. gcore/resources/iam/users.py +97 -65
  124. gcore/resources/security/bgp_announces.py +27 -19
  125. gcore/resources/security/events.py +23 -19
  126. gcore/resources/security/profile_templates.py +9 -5
  127. gcore/resources/security/profiles.py +69 -45
  128. gcore/resources/storage/buckets/buckets.py +37 -25
  129. gcore/resources/storage/buckets/cors.py +19 -11
  130. gcore/resources/storage/buckets/lifecycle.py +19 -11
  131. gcore/resources/storage/buckets/policy.py +25 -13
  132. gcore/resources/storage/credentials.py +19 -15
  133. gcore/resources/storage/locations.py +13 -9
  134. gcore/resources/storage/statistics.py +39 -31
  135. gcore/resources/storage/storage.py +105 -69
  136. gcore/resources/streaming/ai_tasks.py +307 -197
  137. gcore/resources/streaming/broadcasts.py +63 -35
  138. gcore/resources/streaming/directories.py +65 -39
  139. gcore/resources/streaming/players.py +47 -31
  140. gcore/resources/streaming/playlists.py +189 -123
  141. gcore/resources/streaming/quality_sets.py +69 -39
  142. gcore/resources/streaming/restreams.py +47 -27
  143. gcore/resources/streaming/statistics.py +613 -407
  144. gcore/resources/streaming/streams/overlays.py +107 -67
  145. gcore/resources/streaming/streams/streams.py +403 -263
  146. gcore/resources/streaming/videos/subtitles.py +131 -75
  147. gcore/resources/streaming/videos/videos.py +429 -279
  148. gcore/resources/waap/advanced_rules.py +9 -5
  149. gcore/resources/waap/custom_page_sets.py +99 -75
  150. gcore/resources/waap/domains/advanced_rules.py +157 -99
  151. gcore/resources/waap/domains/api_discovery.py +71 -47
  152. gcore/resources/waap/domains/api_path_groups.py +9 -5
  153. gcore/resources/waap/domains/api_paths.py +79 -83
  154. gcore/resources/waap/domains/custom_rules.py +89 -59
  155. gcore/resources/waap/domains/domains.py +59 -41
  156. gcore/resources/waap/domains/firewall_rules.py +83 -55
  157. gcore/resources/waap/domains/insight_silences.py +59 -39
  158. gcore/resources/waap/domains/insights.py +39 -27
  159. gcore/resources/waap/domains/settings.py +21 -13
  160. gcore/resources/waap/domains/statistics.py +99 -75
  161. gcore/resources/waap/insights.py +23 -21
  162. gcore/resources/waap/ip_info/ip_info.py +65 -33
  163. gcore/resources/waap/ip_info/metrics.py +11 -7
  164. gcore/resources/waap/organizations.py +17 -13
  165. gcore/resources/waap/statistics.py +9 -5
  166. gcore/resources/waap/tags.py +17 -17
  167. gcore/resources/waap/waap.py +5 -5
  168. gcore/types/cdn/__init__.py +80 -0
  169. gcore/types/cdn/audit_log_list_params.py +73 -0
  170. gcore/types/cdn/ca_certificate.py +53 -0
  171. gcore/types/cdn/ca_certificate_list.py +10 -0
  172. gcore/types/cdn/cdn_account.py +86 -0
  173. gcore/types/cdn/cdn_account_limits.py +27 -0
  174. gcore/types/cdn/cdn_audit_log_entry.py +66 -0
  175. gcore/types/cdn/cdn_available_features.py +46 -0
  176. gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
  177. gcore/types/cdn/cdn_log_entry.py +70 -0
  178. gcore/types/cdn/cdn_metrics.py +22 -0
  179. gcore/types/cdn/cdn_metrics_groups.py +13 -0
  180. gcore/types/cdn/cdn_metrics_values.py +19 -0
  181. gcore/types/cdn/cdn_resource.py +1977 -0
  182. gcore/types/cdn/cdn_resource_list.py +10 -0
  183. gcore/types/cdn/cdn_update_account_params.py +15 -0
  184. gcore/types/cdn/certificate_create_params.py +51 -0
  185. gcore/types/cdn/certificate_get_status_params.py +14 -0
  186. gcore/types/cdn/certificate_list_params.py +29 -0
  187. gcore/types/cdn/certificate_replace_params.py +39 -0
  188. gcore/types/cdn/log_download_params.py +279 -0
  189. gcore/types/cdn/log_list_params.py +273 -0
  190. gcore/types/cdn/logs/__init__.py +7 -0
  191. gcore/types/cdn/logs/log_settings.py +172 -0
  192. gcore/types/cdn/logs/setting_create_params.py +200 -0
  193. gcore/types/cdn/logs/setting_update_params.py +200 -0
  194. gcore/types/cdn/logs_aggregated_stats.py +23 -0
  195. gcore/types/cdn/logs_uploader/__init__.py +23 -0
  196. gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
  197. gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
  198. gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
  199. gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
  200. gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
  201. gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
  202. gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
  203. gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
  204. gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
  205. gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
  206. gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
  207. gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
  208. gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
  209. gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
  210. gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
  211. gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
  212. gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
  213. gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
  214. gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
  215. gcore/types/cdn/logs_uploader_validation.py +23 -0
  216. gcore/types/cdn/metric_list_params.py +168 -0
  217. gcore/types/cdn/network_capacity.py +22 -0
  218. gcore/types/cdn/origin_group_create_params.py +184 -0
  219. gcore/types/cdn/origin_group_list_params.py +24 -0
  220. gcore/types/cdn/origin_group_replace_params.py +190 -0
  221. gcore/types/cdn/origin_group_update_params.py +190 -0
  222. gcore/types/cdn/origin_groups.py +212 -0
  223. gcore/types/cdn/origin_groups_list.py +10 -0
  224. gcore/types/cdn/public_ip_list.py +15 -0
  225. gcore/types/cdn/public_network_list.py +15 -0
  226. gcore/types/cdn/purge_status.py +55 -0
  227. gcore/types/cdn/resource_aggregated_stats.py +80 -0
  228. gcore/types/cdn/resource_create_params.py +1825 -0
  229. gcore/types/cdn/resource_list_params.py +107 -0
  230. gcore/types/cdn/resource_prefetch_params.py +17 -0
  231. gcore/types/cdn/resource_purge_params.py +71 -0
  232. gcore/types/cdn/resource_replace_params.py +1803 -0
  233. gcore/types/cdn/resource_update_params.py +1794 -0
  234. gcore/types/cdn/resource_usage_stats.py +111 -0
  235. gcore/types/cdn/resources/__init__.py +11 -0
  236. gcore/types/cdn/resources/cdn_resource_rule.py +1695 -0
  237. gcore/types/cdn/resources/origin_shielding.py +15 -0
  238. gcore/types/cdn/resources/rule_create_params.py +1652 -0
  239. gcore/types/cdn/resources/rule_list_response.py +10 -0
  240. gcore/types/cdn/resources/rule_replace_params.py +1654 -0
  241. gcore/types/cdn/resources/rule_update_params.py +1654 -0
  242. gcore/types/cdn/resources/shield_replace_params.py +16 -0
  243. gcore/types/cdn/rule_template.py +1666 -0
  244. gcore/types/cdn/rule_template_create_params.py +1636 -0
  245. gcore/types/cdn/rule_template_list.py +10 -0
  246. gcore/types/cdn/rule_template_replace_params.py +1636 -0
  247. gcore/types/cdn/rule_template_update_params.py +1636 -0
  248. gcore/types/cdn/shield_aggregated_stats.py +23 -0
  249. gcore/types/cdn/shield_list_response.py +25 -0
  250. gcore/types/cdn/ssl_detail.py +62 -0
  251. gcore/types/cdn/ssl_detail_list.py +10 -0
  252. gcore/types/cdn/ssl_request_status.py +135 -0
  253. gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
  254. gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
  255. gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
  256. gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
  257. gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
  258. gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
  259. gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
  260. gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
  261. gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
  262. gcore/types/cdn/usage_series_stats.py +31 -0
  263. gcore/types/cloud/__init__.py +1 -0
  264. gcore/types/cloud/file_share.py +4 -0
  265. gcore/types/cloud/file_share_create_params.py +20 -0
  266. gcore/types/cloud/file_share_update_params.py +40 -3
  267. gcore/types/cloud/floating_ip_update_params.py +3 -1
  268. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
  269. gcore/types/cloud/inference/inference_deployment.py +3 -1
  270. gcore/types/cloud/instance_create_params.py +3 -1
  271. gcore/types/cloud/k8s/cluster_create_params.py +46 -4
  272. gcore/types/cloud/k8s/cluster_update_params.py +60 -6
  273. gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
  274. gcore/types/cloud/k8s/k8s_cluster.py +40 -3
  275. gcore/types/cloud/load_balancer_update_params.py +3 -1
  276. gcore/types/cloud/network_update_params.py +3 -1
  277. gcore/types/cloud/networks/subnet_update_params.py +3 -1
  278. gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
  279. gcore/types/cloud/registries/user_create_params.py +5 -3
  280. gcore/types/cloud/registry_create_params.py +5 -3
  281. gcore/types/cloud/security_group_update_params.py +3 -1
  282. gcore/types/cloud/ssh_key_created.py +6 -3
  283. gcore/types/cloud/volume_update_params.py +3 -1
  284. gcore/types/dns/zone_get_statistics_params.py +12 -9
  285. gcore/types/dns/zone_get_statistics_response.py +3 -1
  286. gcore/types/dns/zone_import_params.py +21 -15
  287. gcore/types/dns/zones/dns_output_rrset.py +7 -3
  288. gcore/types/iam/account_overview.py +7 -2
  289. gcore/types/iam/user.py +7 -2
  290. gcore/types/iam/user_detailed.py +7 -2
  291. gcore/types/iam/user_invite_params.py +4 -1
  292. gcore/types/iam/user_update.py +7 -2
  293. gcore/types/iam/user_update_params.py +7 -2
  294. gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
  295. gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
  296. gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
  297. gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
  298. gcore/types/streaming/ai_task.py +20 -11
  299. gcore/types/streaming/ai_task_create_params.py +20 -11
  300. gcore/types/streaming/ai_task_get_response.py +5 -4
  301. gcore/types/streaming/ai_task_list_params.py +11 -5
  302. gcore/types/streaming/clip.py +33 -22
  303. gcore/types/streaming/create_video_param.py +75 -43
  304. gcore/types/streaming/playlist.py +7 -5
  305. gcore/types/streaming/playlist_create_params.py +7 -5
  306. gcore/types/streaming/playlist_update_params.py +7 -5
  307. gcore/types/streaming/playlist_video.py +75 -43
  308. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
  309. gcore/types/streaming/stream.py +207 -136
  310. gcore/types/streaming/stream_create_clip_params.py +33 -22
  311. gcore/types/streaming/stream_create_params.py +41 -24
  312. gcore/types/streaming/stream_update_params.py +41 -24
  313. gcore/types/streaming/video.py +138 -76
  314. gcore/types/streaming/video_list_params.py +4 -2
  315. gcore/types/streaming/video_update_params.py +75 -43
  316. gcore/types/waap/domain_update_params.py +2 -2
  317. gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
  318. gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
  319. gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
  320. gcore/types/waap/domains/api_path_create_params.py +0 -3
  321. gcore/types/waap/domains/api_path_update_params.py +1 -3
  322. gcore/types/waap/domains/custom_rule_create_params.py +36 -35
  323. gcore/types/waap/domains/custom_rule_update_params.py +31 -33
  324. gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
  325. gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
  326. gcore/types/waap/domains/waap_advanced_rule.py +17 -9
  327. gcore/types/waap/domains/waap_custom_rule.py +5 -2
  328. gcore/types/waap/domains/waap_firewall_rule.py +1 -1
  329. gcore/types/waap/domains/waap_insight.py +1 -1
  330. gcore/types/waap/insight_list_types_params.py +1 -1
  331. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
  332. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/RECORD +334 -214
  333. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
  334. {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,7 @@ from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
11
  from ..._utils import maybe_transform, async_maybe_transform
12
12
  from ..._compat import cached_property
13
13
  from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -92,18 +92,19 @@ class StatisticsResource(SyncAPIResource):
92
92
  date_from: str,
93
93
  date_to: str,
94
94
  stream_id: str,
95
- interval: int | NotGiven = NOT_GIVEN,
96
- units: Literal["second", "minute", "hour", "day", "week", "month"] | NotGiven = NOT_GIVEN,
95
+ interval: int | Omit = omit,
96
+ units: Literal["second", "minute", "hour", "day", "week", "month"] | Omit = omit,
97
97
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
98
98
  # The extra values given here take precedence over values defined on the client or passed to this method.
99
99
  extra_headers: Headers | None = None,
100
100
  extra_query: Query | None = None,
101
101
  extra_body: Body | None = None,
102
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
102
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
103
103
  ) -> Ffprobes:
104
104
  """
105
105
  Aggregates data for the specified video stream in the specified time interval.
106
106
  "interval" and "units" params working together to point aggregation interval.
107
+
107
108
  You can use this method to watch when stream was alive in time, and when it was
108
109
  off.
109
110
 
@@ -123,7 +124,9 @@ class StatisticsResource(SyncAPIResource):
123
124
  timeout: Override the client-level default timeout for this request, in seconds
124
125
  """
125
126
  return self._get(
126
- "/streaming/statistics/ffprobe",
127
+ "/streaming/statistics/ffprobe"
128
+ if self._client._base_url_overridden
129
+ else "https://api.gcore.com//streaming/statistics/ffprobe",
127
130
  options=make_request_options(
128
131
  extra_headers=extra_headers,
129
132
  extra_query=extra_query,
@@ -148,24 +151,27 @@ class StatisticsResource(SyncAPIResource):
148
151
  *,
149
152
  from_: str,
150
153
  to: str,
151
- client_user_id: int | NotGiven = NOT_GIVEN,
152
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
153
- stream_id: int | NotGiven = NOT_GIVEN,
154
+ client_user_id: int | Omit = omit,
155
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
156
+ stream_id: int | Omit = omit,
154
157
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
155
158
  # The extra values given here take precedence over values defined on the client or passed to this method.
156
159
  extra_headers: Headers | None = None,
157
160
  extra_query: Query | None = None,
158
161
  extra_body: Body | None = None,
159
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
162
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
160
163
  ) -> StatisticGetLiveUniqueViewersResponse:
161
- """Calculates time series of unique viewers of Live streams via CDN.
162
-
163
- The statistics
164
- are taken from the data of CDN and work regardless of which player the views
165
- were made with. Works similar to the method `/statistics/cdn/uniqs`. But this
166
- allows you to break down data with the specified granularity: minutes, hours,
167
- days. Based on this method, a graph of unique views in the Customer Portal is
168
- built.
164
+ """
165
+ Calculates time series of unique viewers of Live streams via CDN.
166
+
167
+ The statistics are taken from the data of CDN and work regardless of which
168
+ player the views were made with.
169
+
170
+ Works similar to the method `/statistics/cdn/uniqs`. But this allows you to
171
+ break down data with the specified granularity: minutes, hours, days.
172
+
173
+ Based on this method, a graph of unique views in the Customer Portal is built.
174
+
169
175
  ![Unique viewers via CDN in Customer Portal](https://demo-files.gvideo.io/apidocs/cdn_unique_viewers.png)
170
176
 
171
177
  Args:
@@ -188,7 +194,9 @@ class StatisticsResource(SyncAPIResource):
188
194
  timeout: Override the client-level default timeout for this request, in seconds
189
195
  """
190
196
  return self._get(
191
- "/streaming/statistics/stream/viewers",
197
+ "/streaming/statistics/stream/viewers"
198
+ if self._client._base_url_overridden
199
+ else "https://api.gcore.com//streaming/statistics/stream/viewers",
192
200
  options=make_request_options(
193
201
  extra_headers=extra_headers,
194
202
  extra_query=extra_query,
@@ -212,25 +220,28 @@ class StatisticsResource(SyncAPIResource):
212
220
  self,
213
221
  *,
214
222
  from_: str,
215
- client_user_id: int | NotGiven = NOT_GIVEN,
216
- granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
217
- stream_id: int | NotGiven = NOT_GIVEN,
218
- to: str | NotGiven = NOT_GIVEN,
223
+ client_user_id: int | Omit = omit,
224
+ granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | Omit = omit,
225
+ stream_id: int | Omit = omit,
226
+ to: str | Omit = omit,
219
227
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
220
228
  # The extra values given here take precedence over values defined on the client or passed to this method.
221
229
  extra_headers: Headers | None = None,
222
230
  extra_query: Query | None = None,
223
231
  extra_body: Body | None = None,
224
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
232
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
225
233
  ) -> StreamSeries:
226
234
  """Calculates a time series of live streams watching duration in minutes.
227
235
 
228
236
  Views of
229
- only those streams that meet the specified filters are summed up. The statistics
230
- are taken from the data of CDN and work regardless of which player the views
231
- were made with. Please note that the result for each time interval is in
232
- minutes, it is rounded to the nearest upper integer. You cannot use the sum of
233
- all intervals as the total watch time value; instead, use the /total method.
237
+ only those streams that meet the specified filters are summed up.
238
+
239
+ The statistics are taken from the data of CDN and work regardless of which
240
+ player the views were made with.
241
+
242
+ Please note that the result for each time interval is in minutes, it is rounded
243
+ to the nearest upper integer. You cannot use the sum of all intervals as the
244
+ total watch time value; instead, use the /total method.
234
245
 
235
246
  Args:
236
247
  from_: Start of the time period for counting minutes of watching. Format is date time
@@ -254,7 +265,9 @@ class StatisticsResource(SyncAPIResource):
254
265
  timeout: Override the client-level default timeout for this request, in seconds
255
266
  """
256
267
  return self._get(
257
- "/streaming/statistics/stream/watching_duration",
268
+ "/streaming/statistics/stream/watching_duration"
269
+ if self._client._base_url_overridden
270
+ else "https://api.gcore.com//streaming/statistics/stream/watching_duration",
258
271
  options=make_request_options(
259
272
  extra_headers=extra_headers,
260
273
  extra_query=extra_query,
@@ -277,23 +290,24 @@ class StatisticsResource(SyncAPIResource):
277
290
  def get_live_watch_time_total_cdn(
278
291
  self,
279
292
  *,
280
- client_user_id: int | NotGiven = NOT_GIVEN,
281
- from_: str | NotGiven = NOT_GIVEN,
282
- stream_id: int | NotGiven = NOT_GIVEN,
283
- to: str | NotGiven = NOT_GIVEN,
293
+ client_user_id: int | Omit = omit,
294
+ from_: str | Omit = omit,
295
+ stream_id: int | Omit = omit,
296
+ to: str | Omit = omit,
284
297
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
285
298
  # The extra values given here take precedence over values defined on the client or passed to this method.
286
299
  extra_headers: Headers | None = None,
287
300
  extra_query: Query | None = None,
288
301
  extra_body: Body | None = None,
289
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
302
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
290
303
  ) -> VodTotalStreamDurationSeries:
291
304
  """Calculates the total duration of live streams watching in minutes.
292
305
 
293
306
  Views of only
294
- those streams that meet the specified filters are summed up. The statistics are
295
- taken from the data of CDN and work regardless of which player the views were
296
- made with.
307
+ those streams that meet the specified filters are summed up.
308
+
309
+ The statistics are taken from the data of CDN and work regardless of which
310
+ player the views were made with.
297
311
 
298
312
  Args:
299
313
  client_user_id: Filter by field "`client_user_id`"
@@ -315,7 +329,9 @@ class StatisticsResource(SyncAPIResource):
315
329
  timeout: Override the client-level default timeout for this request, in seconds
316
330
  """
317
331
  return self._get(
318
- "/streaming/statistics/stream/watching_duration/total",
332
+ "/streaming/statistics/stream/watching_duration/total"
333
+ if self._client._base_url_overridden
334
+ else "https://api.gcore.com//streaming/statistics/stream/watching_duration/total",
319
335
  options=make_request_options(
320
336
  extra_headers=extra_headers,
321
337
  extra_query=extra_query,
@@ -339,13 +355,13 @@ class StatisticsResource(SyncAPIResource):
339
355
  *,
340
356
  from_: str,
341
357
  to: str,
342
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
358
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
343
359
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
344
360
  # The extra values given here take precedence over values defined on the client or passed to this method.
345
361
  extra_headers: Headers | None = None,
346
362
  extra_query: Query | None = None,
347
363
  extra_body: Body | None = None,
348
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
364
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
349
365
  ) -> MaxStreamSeries:
350
366
  """Calculates time series of the amount of simultaneous streams.
351
367
 
@@ -368,7 +384,9 @@ class StatisticsResource(SyncAPIResource):
368
384
  timeout: Override the client-level default timeout for this request, in seconds
369
385
  """
370
386
  return self._get(
371
- "/streaming/statistics/max_stream",
387
+ "/streaming/statistics/max_stream"
388
+ if self._client._base_url_overridden
389
+ else "https://api.gcore.com//streaming/statistics/max_stream",
372
390
  options=make_request_options(
373
391
  extra_headers=extra_headers,
374
392
  extra_query=extra_query,
@@ -396,16 +414,17 @@ class StatisticsResource(SyncAPIResource):
396
414
  extra_headers: Headers | None = None,
397
415
  extra_query: Query | None = None,
398
416
  extra_body: Body | None = None,
399
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
417
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
400
418
  ) -> PopularVideos:
401
419
  """
402
420
  Aggregates the number of views for all client videos, grouping them by id and
403
- sort from most popular to less in the built-in player. Note. This method
404
- operates only on data collected by the built-in HTML player. It will not show
405
- statistics if you are using another player or viewing in native OS players
406
- through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations through
407
- CDN (look at method /statistics/cdn/uniqs) or statistics of the players you have
408
- chosen.
421
+ sort from most popular to less in the built-in player.
422
+
423
+ Note. This method operates only on data collected by the built-in HTML player.
424
+ It will not show statistics if you are using another player or viewing in native
425
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
426
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
427
+ the players you have chosen.
409
428
 
410
429
  Args:
411
430
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -421,7 +440,9 @@ class StatisticsResource(SyncAPIResource):
421
440
  timeout: Override the client-level default timeout for this request, in seconds
422
441
  """
423
442
  return self._get(
424
- "/streaming/statistics/popular",
443
+ "/streaming/statistics/popular"
444
+ if self._client._base_url_overridden
445
+ else "https://api.gcore.com//streaming/statistics/popular",
425
446
  options=make_request_options(
426
447
  extra_headers=extra_headers,
427
448
  extra_query=extra_query,
@@ -443,13 +464,13 @@ class StatisticsResource(SyncAPIResource):
443
464
  *,
444
465
  from_: str,
445
466
  to: str,
446
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
467
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
447
468
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
448
469
  # The extra values given here take precedence over values defined on the client or passed to this method.
449
470
  extra_headers: Headers | None = None,
450
471
  extra_query: Query | None = None,
451
472
  extra_body: Body | None = None,
452
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
473
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
453
474
  ) -> StorageSeries:
454
475
  """
455
476
  Calculates time series of the size of disk space in bytes for all processed and
@@ -472,7 +493,9 @@ class StatisticsResource(SyncAPIResource):
472
493
  timeout: Override the client-level default timeout for this request, in seconds
473
494
  """
474
495
  return self._get(
475
- "/streaming/statistics/storage",
496
+ "/streaming/statistics/storage"
497
+ if self._client._base_url_overridden
498
+ else "https://api.gcore.com//streaming/statistics/storage",
476
499
  options=make_request_options(
477
500
  extra_headers=extra_headers,
478
501
  extra_query=extra_query,
@@ -495,13 +518,13 @@ class StatisticsResource(SyncAPIResource):
495
518
  *,
496
519
  from_: str,
497
520
  to: str,
498
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
521
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
499
522
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
500
523
  # The extra values given here take precedence over values defined on the client or passed to this method.
501
524
  extra_headers: Headers | None = None,
502
525
  extra_query: Query | None = None,
503
526
  extra_body: Body | None = None,
504
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
527
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
505
528
  ) -> StreamSeries:
506
529
  """Calculates time series of the transcoding minutes of all streams.
507
530
 
@@ -524,7 +547,9 @@ class StatisticsResource(SyncAPIResource):
524
547
  timeout: Override the client-level default timeout for this request, in seconds
525
548
  """
526
549
  return self._get(
527
- "/streaming/statistics/stream",
550
+ "/streaming/statistics/stream"
551
+ if self._client._base_url_overridden
552
+ else "https://api.gcore.com//streaming/statistics/stream",
528
553
  options=make_request_options(
529
554
  extra_headers=extra_headers,
530
555
  extra_query=extra_query,
@@ -547,29 +572,32 @@ class StatisticsResource(SyncAPIResource):
547
572
  *,
548
573
  date_from: str,
549
574
  date_to: str,
550
- id: str | NotGiven = NOT_GIVEN,
551
- country: str | NotGiven = NOT_GIVEN,
552
- event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
553
- group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]]
554
- | NotGiven = NOT_GIVEN,
555
- host: str | NotGiven = NOT_GIVEN,
556
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
575
+ id: str | Omit = omit,
576
+ country: str | Omit = omit,
577
+ event: Literal["init", "start", "watch"] | Omit = omit,
578
+ group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]] | Omit = omit,
579
+ host: str | Omit = omit,
580
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
557
581
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
558
582
  # The extra values given here take precedence over values defined on the client or passed to this method.
559
583
  extra_headers: Headers | None = None,
560
584
  extra_query: Query | None = None,
561
585
  extra_body: Body | None = None,
562
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
586
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
563
587
  ) -> UniqueViewers:
564
- """Get the number of unique viewers in the built-in player.
588
+ """
589
+ Get the number of unique viewers in the built-in player.
590
+
591
+ Counts the number of unique IPs.
565
592
 
566
- Counts the number of
567
- unique IPs. Allows flexible grouping and filtering. The fields in the response
568
- depend on the selected grouping. Note. This method operates only on data
569
- collected by the built-in HTML player. It will not show statistics if you are
570
- using another player or viewing in native OS players through direct
571
- .m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
572
- method /statistics/cdn/uniqs) or statistics of the players you have chosen.
593
+ Allows flexible grouping and filtering. The fields in the response depend on the
594
+ selected grouping.
595
+
596
+ Note. This method operates only on data collected by the built-in HTML player.
597
+ It will not show statistics if you are using another player or viewing in native
598
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
599
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
600
+ the players you have chosen.
573
601
 
574
602
  Args:
575
603
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -597,7 +625,9 @@ class StatisticsResource(SyncAPIResource):
597
625
  timeout: Override the client-level default timeout for this request, in seconds
598
626
  """
599
627
  return self._get(
600
- "/streaming/statistics/uniqs",
628
+ "/streaming/statistics/uniqs"
629
+ if self._client._base_url_overridden
630
+ else "https://api.gcore.com//streaming/statistics/uniqs",
601
631
  options=make_request_options(
602
632
  extra_headers=extra_headers,
603
633
  extra_query=extra_query,
@@ -625,42 +655,56 @@ class StatisticsResource(SyncAPIResource):
625
655
  *,
626
656
  date_from: str,
627
657
  date_to: str,
628
- id: str | NotGiven = NOT_GIVEN,
629
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
658
+ id: str | Omit = omit,
659
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
630
660
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
631
661
  # The extra values given here take precedence over values defined on the client or passed to this method.
632
662
  extra_headers: Headers | None = None,
633
663
  extra_query: Query | None = None,
634
664
  extra_body: Body | None = None,
635
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
665
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
636
666
  ) -> UniqueViewersCdn:
637
667
  """Сounts the number of unique viewers of a video entity over CDN.
638
668
 
639
669
  It doesn't
640
- matter what player you used. All unique viewers for the specified period of time
641
- are counted. **How does it work?** Calculating the number of unique viewers for
642
- a Live stream or VOD over CDN involves aggregating and analyzing various metrics
643
- to ensure each individual viewer is counted only once, regardless of how many
644
- times they connect or disconnect during the stream. This method provides
645
- statistics for any video viewing by unique users, regardless of viewing method
646
- and a player you used. Thus, this is the most important difference from viewing
647
- through the built-in player:
670
+ matter what player you used.
671
+
672
+ All unique viewers for the specified period of time are counted.
673
+
674
+ **How does it work?**
675
+
676
+ Calculating the number of unique viewers for a Live stream or VOD over CDN
677
+ involves aggregating and analyzing various metrics to ensure each individual
678
+ viewer is counted only once, regardless of how many times they connect or
679
+ disconnect during the stream.
680
+
681
+ This method provides statistics for any video viewing by unique users,
682
+ regardless of viewing method and a player you used. Thus, this is the most
683
+ important difference from viewing through the built-in player:
648
684
 
649
685
  - In method /statistics/uniqs viewers of the built-in player are tracked only.
650
- - But this method tracks all viewers from everywhere. This method is a
651
- combination of two other Live and VOD detailed methods. If you need detailed
652
- information, then see the methods: `/statistics/stream/viewers` and
653
- `/statistics/vod/viewers`. **Data Processing and Deduplication** We us IP
654
- Address & User-Agent combination. Each unique combination of IP address and
655
- User-Agent string might be considered a unique viewer. This approach allows to
656
- accurately estimate the number of unique viewers. However, this is not
657
- foolproof due to NAT (Network Address Translation) and shared networks. Thus
658
- if your users fall under such restrictions, then the number of unique viewers
659
- may be higher than calculated. **Why is there no "Unique Views" method?**
660
- Based on CDN data, we can calculate the number of unique viewers only. Thus
661
- only your player will be able to count the number of unique views (clicks on
662
- the Play button) within the player session (i.e. how many times 1 unique
663
- viewer clicked the Play button within a unique player's session).
686
+ - But this method tracks all viewers from everywhere.
687
+
688
+ This method is a combination of two other Live and VOD detailed methods. If you
689
+ need detailed information, then see the methods: `/statistics/stream/viewers`
690
+ and `/statistics/vod/viewers`.
691
+
692
+ **Data Processing and Deduplication**
693
+
694
+ We us IP Address & User-Agent combination. Each unique combination of IP address
695
+ and User-Agent string might be considered a unique viewer.
696
+
697
+ This approach allows to accurately estimate the number of unique viewers.
698
+ However, this is not foolproof due to NAT (Network Address Translation) and
699
+ shared networks. Thus if your users fall under such restrictions, then the
700
+ number of unique viewers may be higher than calculated.
701
+
702
+ **Why is there no "Unique Views" method?**
703
+
704
+ Based on CDN data, we can calculate the number of unique viewers only. Thus only
705
+ your player will be able to count the number of unique views (clicks on the Play
706
+ button) within the player session (i.e. how many times 1 unique viewer clicked
707
+ the Play button within a unique player's session).
664
708
 
665
709
  Args:
666
710
  date_from: Start of time frame. Format is date time in ISO 8601.
@@ -668,10 +712,13 @@ class StatisticsResource(SyncAPIResource):
668
712
  date_to: End of time frame. Format is date time in ISO 8601.
669
713
 
670
714
  id: Filter by entity's id. Put ID of a Live stream, VOD or a playlist to be
671
- calculated. If the value is omitted, then the calculation is done for all
672
- videos/streams of the specified type. When using this "id" parameter, be sure to
673
- specify the "type" parameter too. If you do not specify a type, the "id" will be
674
- ignored.
715
+ calculated.
716
+
717
+ If the value is omitted, then the calculation is done for all videos/streams of
718
+ the specified type.
719
+
720
+ When using this "id" parameter, be sure to specify the "type" parameter too. If
721
+ you do not specify a type, the "id" will be ignored.
675
722
 
676
723
  type: Filter by entity's type
677
724
 
@@ -684,7 +731,9 @@ class StatisticsResource(SyncAPIResource):
684
731
  timeout: Override the client-level default timeout for this request, in seconds
685
732
  """
686
733
  return self._get(
687
- "/streaming/statistics/cdn/uniqs",
734
+ "/streaming/statistics/cdn/uniqs"
735
+ if self._client._base_url_overridden
736
+ else "https://api.gcore.com//streaming/statistics/cdn/uniqs",
688
737
  options=make_request_options(
689
738
  extra_headers=extra_headers,
690
739
  extra_query=extra_query,
@@ -708,29 +757,30 @@ class StatisticsResource(SyncAPIResource):
708
757
  *,
709
758
  date_from: str,
710
759
  date_to: str,
711
- id: str | NotGiven = NOT_GIVEN,
712
- country: str | NotGiven = NOT_GIVEN,
713
- event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
714
- group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]]
715
- | NotGiven = NOT_GIVEN,
716
- host: str | NotGiven = NOT_GIVEN,
717
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
760
+ id: str | Omit = omit,
761
+ country: str | Omit = omit,
762
+ event: Literal["init", "start", "watch"] | Omit = omit,
763
+ group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]] | Omit = omit,
764
+ host: str | Omit = omit,
765
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
718
766
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
719
767
  # The extra values given here take precedence over values defined on the client or passed to this method.
720
768
  extra_headers: Headers | None = None,
721
769
  extra_query: Query | None = None,
722
770
  extra_body: Body | None = None,
723
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
771
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
724
772
  ) -> Views:
725
- """Get the number of views in the built-in player.
773
+ """
774
+ Get the number of views in the built-in player.
726
775
 
727
- Allows flexible grouping and
728
- filtering. The fields in the response depend on the selected grouping. Note.
729
- This method operates only on data collected by the built-in HTML player. It will
730
- not show statistics if you are using another player or viewing in native OS
731
- players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
732
- through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
733
- you have chosen.
776
+ Allows flexible grouping and filtering. The fields in the response depend on the
777
+ selected grouping.
778
+
779
+ Note. This method operates only on data collected by the built-in HTML player.
780
+ It will not show statistics if you are using another player or viewing in native
781
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
782
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
783
+ the players you have chosen.
734
784
 
735
785
  Args:
736
786
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -758,7 +808,9 @@ class StatisticsResource(SyncAPIResource):
758
808
  timeout: Override the client-level default timeout for this request, in seconds
759
809
  """
760
810
  return self._get(
761
- "/streaming/statistics/views",
811
+ "/streaming/statistics/views"
812
+ if self._client._base_url_overridden
813
+ else "https://api.gcore.com//streaming/statistics/views",
762
814
  options=make_request_options(
763
815
  extra_headers=extra_headers,
764
816
  extra_query=extra_query,
@@ -791,15 +843,17 @@ class StatisticsResource(SyncAPIResource):
791
843
  extra_headers: Headers | None = None,
792
844
  extra_query: Query | None = None,
793
845
  extra_body: Body | None = None,
794
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
846
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
795
847
  ) -> ViewsByBrowser:
796
848
  """
797
849
  Aggregates the number of views for all client videos, grouping them by browsers
798
- in the built-in player. Note. This method operates only on data collected by the
799
- built-in HTML player. It will not show statistics if you are using another
800
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
801
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
802
- or statistics of the players you have chosen.
850
+ in the built-in player.
851
+
852
+ Note. This method operates only on data collected by the built-in HTML player.
853
+ It will not show statistics if you are using another player or viewing in native
854
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
855
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
856
+ the players you have chosen.
803
857
 
804
858
  Args:
805
859
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -815,7 +869,9 @@ class StatisticsResource(SyncAPIResource):
815
869
  timeout: Override the client-level default timeout for this request, in seconds
816
870
  """
817
871
  return self._get(
818
- "/streaming/statistics/browsers",
872
+ "/streaming/statistics/browsers"
873
+ if self._client._base_url_overridden
874
+ else "https://api.gcore.com//streaming/statistics/browsers",
819
875
  options=make_request_options(
820
876
  extra_headers=extra_headers,
821
877
  extra_query=extra_query,
@@ -842,10 +898,11 @@ class StatisticsResource(SyncAPIResource):
842
898
  extra_headers: Headers | None = None,
843
899
  extra_query: Query | None = None,
844
900
  extra_body: Body | None = None,
845
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
901
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
846
902
  ) -> ViewsByCountry:
847
903
  """
848
904
  Aggregates the number of views grouping them by country in the built-in player.
905
+
849
906
  Note. This method operates only on data collected by the built-in HTML player.
850
907
  It will not show statistics if you are using another player or viewing in native
851
908
  OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
@@ -866,7 +923,9 @@ class StatisticsResource(SyncAPIResource):
866
923
  timeout: Override the client-level default timeout for this request, in seconds
867
924
  """
868
925
  return self._get(
869
- "/streaming/statistics/countries",
926
+ "/streaming/statistics/countries"
927
+ if self._client._base_url_overridden
928
+ else "https://api.gcore.com//streaming/statistics/countries",
870
929
  options=make_request_options(
871
930
  extra_headers=extra_headers,
872
931
  extra_query=extra_query,
@@ -893,15 +952,17 @@ class StatisticsResource(SyncAPIResource):
893
952
  extra_headers: Headers | None = None,
894
953
  extra_query: Query | None = None,
895
954
  extra_body: Body | None = None,
896
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
955
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
897
956
  ) -> ViewsByHostname:
898
957
  """
899
958
  Aggregates the number of views, grouping them by "host" domain name the built-in
900
- player was embeded to. Note. This method operates only on data collected by the
901
- built-in HTML player. It will not show statistics if you are using another
902
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
903
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
904
- or statistics of the players you have chosen.
959
+ player was embeded to.
960
+
961
+ Note. This method operates only on data collected by the built-in HTML player.
962
+ It will not show statistics if you are using another player or viewing in native
963
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
964
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
965
+ the players you have chosen.
905
966
 
906
967
  Args:
907
968
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -917,7 +978,9 @@ class StatisticsResource(SyncAPIResource):
917
978
  timeout: Override the client-level default timeout for this request, in seconds
918
979
  """
919
980
  return self._get(
920
- "/streaming/statistics/hosts",
981
+ "/streaming/statistics/hosts"
982
+ if self._client._base_url_overridden
983
+ else "https://api.gcore.com//streaming/statistics/hosts",
921
984
  options=make_request_options(
922
985
  extra_headers=extra_headers,
923
986
  extra_query=extra_query,
@@ -944,15 +1007,17 @@ class StatisticsResource(SyncAPIResource):
944
1007
  extra_headers: Headers | None = None,
945
1008
  extra_query: Query | None = None,
946
1009
  extra_body: Body | None = None,
947
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1010
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
948
1011
  ) -> ViewsByOperatingSystem:
949
1012
  """
950
1013
  Aggregates the number of views for all client videos, grouping them by device
951
- OSs in the built-in player. Note. This method operates only on data collected by
952
- the built-in HTML player. It will not show statistics if you are using another
953
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
954
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
955
- or statistics of the players you have chosen.
1014
+ OSs in the built-in player.
1015
+
1016
+ Note. This method operates only on data collected by the built-in HTML player.
1017
+ It will not show statistics if you are using another player or viewing in native
1018
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
1019
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
1020
+ the players you have chosen.
956
1021
 
957
1022
  Args:
958
1023
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -968,7 +1033,9 @@ class StatisticsResource(SyncAPIResource):
968
1033
  timeout: Override the client-level default timeout for this request, in seconds
969
1034
  """
970
1035
  return self._get(
971
- "/streaming/statistics/systems",
1036
+ "/streaming/statistics/systems"
1037
+ if self._client._base_url_overridden
1038
+ else "https://api.gcore.com//streaming/statistics/systems",
972
1039
  options=make_request_options(
973
1040
  extra_headers=extra_headers,
974
1041
  extra_query=extra_query,
@@ -995,15 +1062,17 @@ class StatisticsResource(SyncAPIResource):
995
1062
  extra_headers: Headers | None = None,
996
1063
  extra_query: Query | None = None,
997
1064
  extra_body: Body | None = None,
998
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1065
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
999
1066
  ) -> ViewsByReferer:
1000
1067
  """
1001
1068
  Aggregates the number of views, grouping them by "referer" URL of pages the
1002
- built-in player was embeded to. Note. This method operates only on data
1003
- collected by the built-in HTML player. It will not show statistics if you are
1004
- using another player or viewing in native OS players through direct
1005
- .m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
1006
- method /statistics/cdn/uniqs) or statistics of the players you have chosen.
1069
+ built-in player was embeded to.
1070
+
1071
+ Note. This method operates only on data collected by the built-in HTML player.
1072
+ It will not show statistics if you are using another player or viewing in native
1073
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
1074
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
1075
+ the players you have chosen.
1007
1076
 
1008
1077
  Args:
1009
1078
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -1019,7 +1088,9 @@ class StatisticsResource(SyncAPIResource):
1019
1088
  timeout: Override the client-level default timeout for this request, in seconds
1020
1089
  """
1021
1090
  return self._get(
1022
- "/streaming/statistics/embeds",
1091
+ "/streaming/statistics/embeds"
1092
+ if self._client._base_url_overridden
1093
+ else "https://api.gcore.com//streaming/statistics/embeds",
1023
1094
  options=make_request_options(
1024
1095
  extra_headers=extra_headers,
1025
1096
  extra_query=extra_query,
@@ -1046,15 +1117,17 @@ class StatisticsResource(SyncAPIResource):
1046
1117
  extra_headers: Headers | None = None,
1047
1118
  extra_query: Query | None = None,
1048
1119
  extra_body: Body | None = None,
1049
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1120
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1050
1121
  ) -> ViewsByRegion:
1051
1122
  """
1052
1123
  Aggregates the number of views grouping them by regions of countries in the
1053
- built-in player. Note. This method operates only on data collected by the
1054
- built-in HTML player. It will not show statistics if you are using another
1055
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
1056
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
1057
- or statistics of the players you have chosen.
1124
+ built-in player.
1125
+
1126
+ Note. This method operates only on data collected by the built-in HTML player.
1127
+ It will not show statistics if you are using another player or viewing in native
1128
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
1129
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
1130
+ the players you have chosen.
1058
1131
 
1059
1132
  Args:
1060
1133
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -1070,7 +1143,9 @@ class StatisticsResource(SyncAPIResource):
1070
1143
  timeout: Override the client-level default timeout for this request, in seconds
1071
1144
  """
1072
1145
  return self._get(
1073
- "/streaming/statistics/regions",
1146
+ "/streaming/statistics/regions"
1147
+ if self._client._base_url_overridden
1148
+ else "https://api.gcore.com//streaming/statistics/regions",
1074
1149
  options=make_request_options(
1075
1150
  extra_headers=extra_headers,
1076
1151
  extra_query=extra_query,
@@ -1099,18 +1174,22 @@ class StatisticsResource(SyncAPIResource):
1099
1174
  extra_headers: Headers | None = None,
1100
1175
  extra_query: Query | None = None,
1101
1176
  extra_body: Body | None = None,
1102
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1177
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1103
1178
  ) -> ViewsHeatmap:
1104
1179
  """
1105
1180
  Shows information about what part of the video your viewers watched in the
1106
- built-in player. This way you can find out how many viewers started watching the
1107
- video, and where they stopped watching instead of watching the entire video to
1108
- the end. Has different format of response depends on query param "type". Note.
1109
- This method operates only on data collected by the built-in HTML player. It will
1110
- not show statistics if you are using another player or viewing in native OS
1111
- players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
1112
- through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
1113
- you have chosen.
1181
+ built-in player.
1182
+
1183
+ This way you can find out how many viewers started watching the video, and where
1184
+ they stopped watching instead of watching the entire video to the end.
1185
+
1186
+ Has different format of response depends on query param "type".
1187
+
1188
+ Note. This method operates only on data collected by the built-in HTML player.
1189
+ It will not show statistics if you are using another player or viewing in native
1190
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
1191
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
1192
+ the players you have chosen.
1114
1193
 
1115
1194
  Args:
1116
1195
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -1130,7 +1209,9 @@ class StatisticsResource(SyncAPIResource):
1130
1209
  timeout: Override the client-level default timeout for this request, in seconds
1131
1210
  """
1132
1211
  return self._get(
1133
- "/streaming/statistics/heatmap",
1212
+ "/streaming/statistics/heatmap"
1213
+ if self._client._base_url_overridden
1214
+ else "https://api.gcore.com//streaming/statistics/heatmap",
1134
1215
  options=make_request_options(
1135
1216
  extra_headers=extra_headers,
1136
1217
  extra_query=extra_query,
@@ -1159,12 +1240,14 @@ class StatisticsResource(SyncAPIResource):
1159
1240
  extra_headers: Headers | None = None,
1160
1241
  extra_query: Query | None = None,
1161
1242
  extra_body: Body | None = None,
1162
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1243
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1163
1244
  ) -> VodStatisticsSeries:
1164
1245
  """
1165
1246
  Calculates time series of the duration in minutes for all processed and
1166
- undeleted client videos. The data is updated every 8 hours, it does not make
1167
- sense to set the granulation less than 1 day.
1247
+ undeleted client videos.
1248
+
1249
+ The data is updated every 8 hours, it does not make sense to set the granulation
1250
+ less than 1 day.
1168
1251
 
1169
1252
  Args:
1170
1253
  from_: Start of time frame. Datetime in ISO 8601 format.
@@ -1180,7 +1263,9 @@ class StatisticsResource(SyncAPIResource):
1180
1263
  timeout: Override the client-level default timeout for this request, in seconds
1181
1264
  """
1182
1265
  return self._get(
1183
- "/streaming/statistics/vod/storage_duration",
1266
+ "/streaming/statistics/vod/storage_duration"
1267
+ if self._client._base_url_overridden
1268
+ else "https://api.gcore.com//streaming/statistics/vod/storage_duration",
1184
1269
  options=make_request_options(
1185
1270
  extra_headers=extra_headers,
1186
1271
  extra_query=extra_query,
@@ -1207,12 +1292,14 @@ class StatisticsResource(SyncAPIResource):
1207
1292
  extra_headers: Headers | None = None,
1208
1293
  extra_query: Query | None = None,
1209
1294
  extra_body: Body | None = None,
1210
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1295
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1211
1296
  ) -> VodStatisticsSeries:
1212
1297
  """
1213
1298
  Calculates time series of the transcoding time in minutes for all processed
1214
- client videos. The data is updated every 8 hours, it does not make sense to set
1215
- the granulation less than 1 day.
1299
+ client videos.
1300
+
1301
+ The data is updated every 8 hours, it does not make sense to set the granulation
1302
+ less than 1 day.
1216
1303
 
1217
1304
  Args:
1218
1305
  from_: Start of time frame. Datetime in ISO 8601 format.
@@ -1228,7 +1315,9 @@ class StatisticsResource(SyncAPIResource):
1228
1315
  timeout: Override the client-level default timeout for this request, in seconds
1229
1316
  """
1230
1317
  return self._get(
1231
- "/streaming/statistics/vod/transcoding_duration",
1318
+ "/streaming/statistics/vod/transcoding_duration"
1319
+ if self._client._base_url_overridden
1320
+ else "https://api.gcore.com//streaming/statistics/vod/transcoding_duration",
1232
1321
  options=make_request_options(
1233
1322
  extra_headers=extra_headers,
1234
1323
  extra_query=extra_query,
@@ -1250,23 +1339,27 @@ class StatisticsResource(SyncAPIResource):
1250
1339
  *,
1251
1340
  from_: str,
1252
1341
  to: str,
1253
- client_user_id: int | NotGiven = NOT_GIVEN,
1254
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
1255
- slug: str | NotGiven = NOT_GIVEN,
1342
+ client_user_id: int | Omit = omit,
1343
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
1344
+ slug: str | Omit = omit,
1256
1345
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1257
1346
  # The extra values given here take precedence over values defined on the client or passed to this method.
1258
1347
  extra_headers: Headers | None = None,
1259
1348
  extra_query: Query | None = None,
1260
1349
  extra_body: Body | None = None,
1261
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1350
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1262
1351
  ) -> VodStatisticsSeries:
1263
- """Calculates time series of unique viewers of VOD via CDN.
1352
+ """
1353
+ Calculates time series of unique viewers of VOD via CDN.
1354
+
1355
+ The statistics are taken from the data of CDN and work regardless of which
1356
+ player the views were made with.
1357
+
1358
+ Works similar to the method `/statistics/cdn/uniqs`. But this allows you to
1359
+ break down data with the specified granularity: minutes, hours, days.
1264
1360
 
1265
- The statistics are
1266
- taken from the data of CDN and work regardless of which player the views were
1267
- made with. Works similar to the method `/statistics/cdn/uniqs`. But this allows
1268
- you to break down data with the specified granularity: minutes, hours, days.
1269
1361
  Based on this method, a graph of unique views in the Customer Portal is built.
1362
+
1270
1363
  ![Unique viewers via CDN in Customer Portal](https://demo-files.gvideo.io/apidocs/cdn_unique_viewers.png)
1271
1364
 
1272
1365
  Args:
@@ -1289,7 +1382,9 @@ class StatisticsResource(SyncAPIResource):
1289
1382
  timeout: Override the client-level default timeout for this request, in seconds
1290
1383
  """
1291
1384
  return self._get(
1292
- "/streaming/statistics/vod/viewers",
1385
+ "/streaming/statistics/vod/viewers"
1386
+ if self._client._base_url_overridden
1387
+ else "https://api.gcore.com//streaming/statistics/vod/viewers",
1293
1388
  options=make_request_options(
1294
1389
  extra_headers=extra_headers,
1295
1390
  extra_query=extra_query,
@@ -1313,25 +1408,28 @@ class StatisticsResource(SyncAPIResource):
1313
1408
  self,
1314
1409
  *,
1315
1410
  from_: str,
1316
- client_user_id: int | NotGiven = NOT_GIVEN,
1317
- granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
1318
- slug: str | NotGiven = NOT_GIVEN,
1319
- to: str | NotGiven = NOT_GIVEN,
1411
+ client_user_id: int | Omit = omit,
1412
+ granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | Omit = omit,
1413
+ slug: str | Omit = omit,
1414
+ to: str | Omit = omit,
1320
1415
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1321
1416
  # The extra values given here take precedence over values defined on the client or passed to this method.
1322
1417
  extra_headers: Headers | None = None,
1323
1418
  extra_query: Query | None = None,
1324
1419
  extra_body: Body | None = None,
1325
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1420
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1326
1421
  ) -> VodStatisticsSeries:
1327
1422
  """Calculates a time series of video watching duration in minutes.
1328
1423
 
1329
1424
  Views of only
1330
- those videos that meet the specified filters are summed up. The statistics are
1331
- taken from the data of CDN and work regardless of which player the views were
1332
- made with. Please note that the result for each time interval is in minutes, it
1333
- is rounded to the nearest upper integer. You cannot use the sum of all intervals
1334
- as the total watch time value; instead, use the /total method.
1425
+ those videos that meet the specified filters are summed up.
1426
+
1427
+ The statistics are taken from the data of CDN and work regardless of which
1428
+ player the views were made with.
1429
+
1430
+ Please note that the result for each time interval is in minutes, it is rounded
1431
+ to the nearest upper integer. You cannot use the sum of all intervals as the
1432
+ total watch time value; instead, use the /total method.
1335
1433
 
1336
1434
  Args:
1337
1435
  from_: Start of the time period for counting minutes of watching. Format is date time
@@ -1355,7 +1453,9 @@ class StatisticsResource(SyncAPIResource):
1355
1453
  timeout: Override the client-level default timeout for this request, in seconds
1356
1454
  """
1357
1455
  return self._get(
1358
- "/streaming/statistics/vod/watching_duration",
1456
+ "/streaming/statistics/vod/watching_duration"
1457
+ if self._client._base_url_overridden
1458
+ else "https://api.gcore.com//streaming/statistics/vod/watching_duration",
1359
1459
  options=make_request_options(
1360
1460
  extra_headers=extra_headers,
1361
1461
  extra_query=extra_query,
@@ -1378,23 +1478,24 @@ class StatisticsResource(SyncAPIResource):
1378
1478
  def get_vod_watch_time_total_cdn(
1379
1479
  self,
1380
1480
  *,
1381
- client_user_id: int | NotGiven = NOT_GIVEN,
1382
- from_: str | NotGiven = NOT_GIVEN,
1383
- slug: str | NotGiven = NOT_GIVEN,
1384
- to: str | NotGiven = NOT_GIVEN,
1481
+ client_user_id: int | Omit = omit,
1482
+ from_: str | Omit = omit,
1483
+ slug: str | Omit = omit,
1484
+ to: str | Omit = omit,
1385
1485
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1386
1486
  # The extra values given here take precedence over values defined on the client or passed to this method.
1387
1487
  extra_headers: Headers | None = None,
1388
1488
  extra_query: Query | None = None,
1389
1489
  extra_body: Body | None = None,
1390
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1490
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1391
1491
  ) -> StatisticGetVodWatchTimeTotalCdnResponse:
1392
1492
  """Calculates the total duration of video watching in minutes.
1393
1493
 
1394
1494
  Views of only those
1395
- videos that meet the specified filters are summed up. The statistics are taken
1396
- from the data of CDN and work regardless of which player the views were made
1397
- with.
1495
+ videos that meet the specified filters are summed up.
1496
+
1497
+ The statistics are taken from the data of CDN and work regardless of which
1498
+ player the views were made with.
1398
1499
 
1399
1500
  Args:
1400
1501
  client_user_id: Filter by field "`client_user_id`"
@@ -1416,7 +1517,9 @@ class StatisticsResource(SyncAPIResource):
1416
1517
  timeout: Override the client-level default timeout for this request, in seconds
1417
1518
  """
1418
1519
  return self._get(
1419
- "/streaming/statistics/vod/watching_duration/total",
1520
+ "/streaming/statistics/vod/watching_duration/total"
1521
+ if self._client._base_url_overridden
1522
+ else "https://api.gcore.com//streaming/statistics/vod/watching_duration/total",
1420
1523
  options=make_request_options(
1421
1524
  extra_headers=extra_headers,
1422
1525
  extra_query=extra_query,
@@ -1462,18 +1565,19 @@ class AsyncStatisticsResource(AsyncAPIResource):
1462
1565
  date_from: str,
1463
1566
  date_to: str,
1464
1567
  stream_id: str,
1465
- interval: int | NotGiven = NOT_GIVEN,
1466
- units: Literal["second", "minute", "hour", "day", "week", "month"] | NotGiven = NOT_GIVEN,
1568
+ interval: int | Omit = omit,
1569
+ units: Literal["second", "minute", "hour", "day", "week", "month"] | Omit = omit,
1467
1570
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1468
1571
  # The extra values given here take precedence over values defined on the client or passed to this method.
1469
1572
  extra_headers: Headers | None = None,
1470
1573
  extra_query: Query | None = None,
1471
1574
  extra_body: Body | None = None,
1472
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1575
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1473
1576
  ) -> Ffprobes:
1474
1577
  """
1475
1578
  Aggregates data for the specified video stream in the specified time interval.
1476
1579
  "interval" and "units" params working together to point aggregation interval.
1580
+
1477
1581
  You can use this method to watch when stream was alive in time, and when it was
1478
1582
  off.
1479
1583
 
@@ -1493,7 +1597,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1493
1597
  timeout: Override the client-level default timeout for this request, in seconds
1494
1598
  """
1495
1599
  return await self._get(
1496
- "/streaming/statistics/ffprobe",
1600
+ "/streaming/statistics/ffprobe"
1601
+ if self._client._base_url_overridden
1602
+ else "https://api.gcore.com//streaming/statistics/ffprobe",
1497
1603
  options=make_request_options(
1498
1604
  extra_headers=extra_headers,
1499
1605
  extra_query=extra_query,
@@ -1518,24 +1624,27 @@ class AsyncStatisticsResource(AsyncAPIResource):
1518
1624
  *,
1519
1625
  from_: str,
1520
1626
  to: str,
1521
- client_user_id: int | NotGiven = NOT_GIVEN,
1522
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
1523
- stream_id: int | NotGiven = NOT_GIVEN,
1627
+ client_user_id: int | Omit = omit,
1628
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
1629
+ stream_id: int | Omit = omit,
1524
1630
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1525
1631
  # The extra values given here take precedence over values defined on the client or passed to this method.
1526
1632
  extra_headers: Headers | None = None,
1527
1633
  extra_query: Query | None = None,
1528
1634
  extra_body: Body | None = None,
1529
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1635
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1530
1636
  ) -> StatisticGetLiveUniqueViewersResponse:
1531
- """Calculates time series of unique viewers of Live streams via CDN.
1532
-
1533
- The statistics
1534
- are taken from the data of CDN and work regardless of which player the views
1535
- were made with. Works similar to the method `/statistics/cdn/uniqs`. But this
1536
- allows you to break down data with the specified granularity: minutes, hours,
1537
- days. Based on this method, a graph of unique views in the Customer Portal is
1538
- built.
1637
+ """
1638
+ Calculates time series of unique viewers of Live streams via CDN.
1639
+
1640
+ The statistics are taken from the data of CDN and work regardless of which
1641
+ player the views were made with.
1642
+
1643
+ Works similar to the method `/statistics/cdn/uniqs`. But this allows you to
1644
+ break down data with the specified granularity: minutes, hours, days.
1645
+
1646
+ Based on this method, a graph of unique views in the Customer Portal is built.
1647
+
1539
1648
  ![Unique viewers via CDN in Customer Portal](https://demo-files.gvideo.io/apidocs/cdn_unique_viewers.png)
1540
1649
 
1541
1650
  Args:
@@ -1558,7 +1667,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1558
1667
  timeout: Override the client-level default timeout for this request, in seconds
1559
1668
  """
1560
1669
  return await self._get(
1561
- "/streaming/statistics/stream/viewers",
1670
+ "/streaming/statistics/stream/viewers"
1671
+ if self._client._base_url_overridden
1672
+ else "https://api.gcore.com//streaming/statistics/stream/viewers",
1562
1673
  options=make_request_options(
1563
1674
  extra_headers=extra_headers,
1564
1675
  extra_query=extra_query,
@@ -1582,25 +1693,28 @@ class AsyncStatisticsResource(AsyncAPIResource):
1582
1693
  self,
1583
1694
  *,
1584
1695
  from_: str,
1585
- client_user_id: int | NotGiven = NOT_GIVEN,
1586
- granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
1587
- stream_id: int | NotGiven = NOT_GIVEN,
1588
- to: str | NotGiven = NOT_GIVEN,
1696
+ client_user_id: int | Omit = omit,
1697
+ granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | Omit = omit,
1698
+ stream_id: int | Omit = omit,
1699
+ to: str | Omit = omit,
1589
1700
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1590
1701
  # The extra values given here take precedence over values defined on the client or passed to this method.
1591
1702
  extra_headers: Headers | None = None,
1592
1703
  extra_query: Query | None = None,
1593
1704
  extra_body: Body | None = None,
1594
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1705
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1595
1706
  ) -> StreamSeries:
1596
1707
  """Calculates a time series of live streams watching duration in minutes.
1597
1708
 
1598
1709
  Views of
1599
- only those streams that meet the specified filters are summed up. The statistics
1600
- are taken from the data of CDN and work regardless of which player the views
1601
- were made with. Please note that the result for each time interval is in
1602
- minutes, it is rounded to the nearest upper integer. You cannot use the sum of
1603
- all intervals as the total watch time value; instead, use the /total method.
1710
+ only those streams that meet the specified filters are summed up.
1711
+
1712
+ The statistics are taken from the data of CDN and work regardless of which
1713
+ player the views were made with.
1714
+
1715
+ Please note that the result for each time interval is in minutes, it is rounded
1716
+ to the nearest upper integer. You cannot use the sum of all intervals as the
1717
+ total watch time value; instead, use the /total method.
1604
1718
 
1605
1719
  Args:
1606
1720
  from_: Start of the time period for counting minutes of watching. Format is date time
@@ -1624,7 +1738,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1624
1738
  timeout: Override the client-level default timeout for this request, in seconds
1625
1739
  """
1626
1740
  return await self._get(
1627
- "/streaming/statistics/stream/watching_duration",
1741
+ "/streaming/statistics/stream/watching_duration"
1742
+ if self._client._base_url_overridden
1743
+ else "https://api.gcore.com//streaming/statistics/stream/watching_duration",
1628
1744
  options=make_request_options(
1629
1745
  extra_headers=extra_headers,
1630
1746
  extra_query=extra_query,
@@ -1647,23 +1763,24 @@ class AsyncStatisticsResource(AsyncAPIResource):
1647
1763
  async def get_live_watch_time_total_cdn(
1648
1764
  self,
1649
1765
  *,
1650
- client_user_id: int | NotGiven = NOT_GIVEN,
1651
- from_: str | NotGiven = NOT_GIVEN,
1652
- stream_id: int | NotGiven = NOT_GIVEN,
1653
- to: str | NotGiven = NOT_GIVEN,
1766
+ client_user_id: int | Omit = omit,
1767
+ from_: str | Omit = omit,
1768
+ stream_id: int | Omit = omit,
1769
+ to: str | Omit = omit,
1654
1770
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1655
1771
  # The extra values given here take precedence over values defined on the client or passed to this method.
1656
1772
  extra_headers: Headers | None = None,
1657
1773
  extra_query: Query | None = None,
1658
1774
  extra_body: Body | None = None,
1659
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1775
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1660
1776
  ) -> VodTotalStreamDurationSeries:
1661
1777
  """Calculates the total duration of live streams watching in minutes.
1662
1778
 
1663
1779
  Views of only
1664
- those streams that meet the specified filters are summed up. The statistics are
1665
- taken from the data of CDN and work regardless of which player the views were
1666
- made with.
1780
+ those streams that meet the specified filters are summed up.
1781
+
1782
+ The statistics are taken from the data of CDN and work regardless of which
1783
+ player the views were made with.
1667
1784
 
1668
1785
  Args:
1669
1786
  client_user_id: Filter by field "`client_user_id`"
@@ -1685,7 +1802,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1685
1802
  timeout: Override the client-level default timeout for this request, in seconds
1686
1803
  """
1687
1804
  return await self._get(
1688
- "/streaming/statistics/stream/watching_duration/total",
1805
+ "/streaming/statistics/stream/watching_duration/total"
1806
+ if self._client._base_url_overridden
1807
+ else "https://api.gcore.com//streaming/statistics/stream/watching_duration/total",
1689
1808
  options=make_request_options(
1690
1809
  extra_headers=extra_headers,
1691
1810
  extra_query=extra_query,
@@ -1709,13 +1828,13 @@ class AsyncStatisticsResource(AsyncAPIResource):
1709
1828
  *,
1710
1829
  from_: str,
1711
1830
  to: str,
1712
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
1831
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
1713
1832
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1714
1833
  # The extra values given here take precedence over values defined on the client or passed to this method.
1715
1834
  extra_headers: Headers | None = None,
1716
1835
  extra_query: Query | None = None,
1717
1836
  extra_body: Body | None = None,
1718
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1837
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1719
1838
  ) -> MaxStreamSeries:
1720
1839
  """Calculates time series of the amount of simultaneous streams.
1721
1840
 
@@ -1738,7 +1857,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1738
1857
  timeout: Override the client-level default timeout for this request, in seconds
1739
1858
  """
1740
1859
  return await self._get(
1741
- "/streaming/statistics/max_stream",
1860
+ "/streaming/statistics/max_stream"
1861
+ if self._client._base_url_overridden
1862
+ else "https://api.gcore.com//streaming/statistics/max_stream",
1742
1863
  options=make_request_options(
1743
1864
  extra_headers=extra_headers,
1744
1865
  extra_query=extra_query,
@@ -1766,16 +1887,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
1766
1887
  extra_headers: Headers | None = None,
1767
1888
  extra_query: Query | None = None,
1768
1889
  extra_body: Body | None = None,
1769
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1890
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1770
1891
  ) -> PopularVideos:
1771
1892
  """
1772
1893
  Aggregates the number of views for all client videos, grouping them by id and
1773
- sort from most popular to less in the built-in player. Note. This method
1774
- operates only on data collected by the built-in HTML player. It will not show
1775
- statistics if you are using another player or viewing in native OS players
1776
- through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations through
1777
- CDN (look at method /statistics/cdn/uniqs) or statistics of the players you have
1778
- chosen.
1894
+ sort from most popular to less in the built-in player.
1895
+
1896
+ Note. This method operates only on data collected by the built-in HTML player.
1897
+ It will not show statistics if you are using another player or viewing in native
1898
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
1899
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
1900
+ the players you have chosen.
1779
1901
 
1780
1902
  Args:
1781
1903
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -1791,7 +1913,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1791
1913
  timeout: Override the client-level default timeout for this request, in seconds
1792
1914
  """
1793
1915
  return await self._get(
1794
- "/streaming/statistics/popular",
1916
+ "/streaming/statistics/popular"
1917
+ if self._client._base_url_overridden
1918
+ else "https://api.gcore.com//streaming/statistics/popular",
1795
1919
  options=make_request_options(
1796
1920
  extra_headers=extra_headers,
1797
1921
  extra_query=extra_query,
@@ -1813,13 +1937,13 @@ class AsyncStatisticsResource(AsyncAPIResource):
1813
1937
  *,
1814
1938
  from_: str,
1815
1939
  to: str,
1816
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
1940
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
1817
1941
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1818
1942
  # The extra values given here take precedence over values defined on the client or passed to this method.
1819
1943
  extra_headers: Headers | None = None,
1820
1944
  extra_query: Query | None = None,
1821
1945
  extra_body: Body | None = None,
1822
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1946
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1823
1947
  ) -> StorageSeries:
1824
1948
  """
1825
1949
  Calculates time series of the size of disk space in bytes for all processed and
@@ -1842,7 +1966,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1842
1966
  timeout: Override the client-level default timeout for this request, in seconds
1843
1967
  """
1844
1968
  return await self._get(
1845
- "/streaming/statistics/storage",
1969
+ "/streaming/statistics/storage"
1970
+ if self._client._base_url_overridden
1971
+ else "https://api.gcore.com//streaming/statistics/storage",
1846
1972
  options=make_request_options(
1847
1973
  extra_headers=extra_headers,
1848
1974
  extra_query=extra_query,
@@ -1865,13 +1991,13 @@ class AsyncStatisticsResource(AsyncAPIResource):
1865
1991
  *,
1866
1992
  from_: str,
1867
1993
  to: str,
1868
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
1994
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
1869
1995
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1870
1996
  # The extra values given here take precedence over values defined on the client or passed to this method.
1871
1997
  extra_headers: Headers | None = None,
1872
1998
  extra_query: Query | None = None,
1873
1999
  extra_body: Body | None = None,
1874
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2000
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1875
2001
  ) -> StreamSeries:
1876
2002
  """Calculates time series of the transcoding minutes of all streams.
1877
2003
 
@@ -1894,7 +2020,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1894
2020
  timeout: Override the client-level default timeout for this request, in seconds
1895
2021
  """
1896
2022
  return await self._get(
1897
- "/streaming/statistics/stream",
2023
+ "/streaming/statistics/stream"
2024
+ if self._client._base_url_overridden
2025
+ else "https://api.gcore.com//streaming/statistics/stream",
1898
2026
  options=make_request_options(
1899
2027
  extra_headers=extra_headers,
1900
2028
  extra_query=extra_query,
@@ -1917,29 +2045,32 @@ class AsyncStatisticsResource(AsyncAPIResource):
1917
2045
  *,
1918
2046
  date_from: str,
1919
2047
  date_to: str,
1920
- id: str | NotGiven = NOT_GIVEN,
1921
- country: str | NotGiven = NOT_GIVEN,
1922
- event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
1923
- group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]]
1924
- | NotGiven = NOT_GIVEN,
1925
- host: str | NotGiven = NOT_GIVEN,
1926
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
2048
+ id: str | Omit = omit,
2049
+ country: str | Omit = omit,
2050
+ event: Literal["init", "start", "watch"] | Omit = omit,
2051
+ group: List[Literal["date", "host", "os", "browser", "platform", "ip", "country", "event", "id"]] | Omit = omit,
2052
+ host: str | Omit = omit,
2053
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
1927
2054
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1928
2055
  # The extra values given here take precedence over values defined on the client or passed to this method.
1929
2056
  extra_headers: Headers | None = None,
1930
2057
  extra_query: Query | None = None,
1931
2058
  extra_body: Body | None = None,
1932
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2059
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1933
2060
  ) -> UniqueViewers:
1934
- """Get the number of unique viewers in the built-in player.
2061
+ """
2062
+ Get the number of unique viewers in the built-in player.
2063
+
2064
+ Counts the number of unique IPs.
1935
2065
 
1936
- Counts the number of
1937
- unique IPs. Allows flexible grouping and filtering. The fields in the response
1938
- depend on the selected grouping. Note. This method operates only on data
1939
- collected by the built-in HTML player. It will not show statistics if you are
1940
- using another player or viewing in native OS players through direct
1941
- .m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
1942
- method /statistics/cdn/uniqs) or statistics of the players you have chosen.
2066
+ Allows flexible grouping and filtering. The fields in the response depend on the
2067
+ selected grouping.
2068
+
2069
+ Note. This method operates only on data collected by the built-in HTML player.
2070
+ It will not show statistics if you are using another player or viewing in native
2071
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2072
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2073
+ the players you have chosen.
1943
2074
 
1944
2075
  Args:
1945
2076
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -1967,7 +2098,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1967
2098
  timeout: Override the client-level default timeout for this request, in seconds
1968
2099
  """
1969
2100
  return await self._get(
1970
- "/streaming/statistics/uniqs",
2101
+ "/streaming/statistics/uniqs"
2102
+ if self._client._base_url_overridden
2103
+ else "https://api.gcore.com//streaming/statistics/uniqs",
1971
2104
  options=make_request_options(
1972
2105
  extra_headers=extra_headers,
1973
2106
  extra_query=extra_query,
@@ -1995,42 +2128,56 @@ class AsyncStatisticsResource(AsyncAPIResource):
1995
2128
  *,
1996
2129
  date_from: str,
1997
2130
  date_to: str,
1998
- id: str | NotGiven = NOT_GIVEN,
1999
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
2131
+ id: str | Omit = omit,
2132
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
2000
2133
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2001
2134
  # The extra values given here take precedence over values defined on the client or passed to this method.
2002
2135
  extra_headers: Headers | None = None,
2003
2136
  extra_query: Query | None = None,
2004
2137
  extra_body: Body | None = None,
2005
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2138
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2006
2139
  ) -> UniqueViewersCdn:
2007
2140
  """Сounts the number of unique viewers of a video entity over CDN.
2008
2141
 
2009
2142
  It doesn't
2010
- matter what player you used. All unique viewers for the specified period of time
2011
- are counted. **How does it work?** Calculating the number of unique viewers for
2012
- a Live stream or VOD over CDN involves aggregating and analyzing various metrics
2013
- to ensure each individual viewer is counted only once, regardless of how many
2014
- times they connect or disconnect during the stream. This method provides
2015
- statistics for any video viewing by unique users, regardless of viewing method
2016
- and a player you used. Thus, this is the most important difference from viewing
2017
- through the built-in player:
2143
+ matter what player you used.
2144
+
2145
+ All unique viewers for the specified period of time are counted.
2146
+
2147
+ **How does it work?**
2148
+
2149
+ Calculating the number of unique viewers for a Live stream or VOD over CDN
2150
+ involves aggregating and analyzing various metrics to ensure each individual
2151
+ viewer is counted only once, regardless of how many times they connect or
2152
+ disconnect during the stream.
2153
+
2154
+ This method provides statistics for any video viewing by unique users,
2155
+ regardless of viewing method and a player you used. Thus, this is the most
2156
+ important difference from viewing through the built-in player:
2018
2157
 
2019
2158
  - In method /statistics/uniqs viewers of the built-in player are tracked only.
2020
- - But this method tracks all viewers from everywhere. This method is a
2021
- combination of two other Live and VOD detailed methods. If you need detailed
2022
- information, then see the methods: `/statistics/stream/viewers` and
2023
- `/statistics/vod/viewers`. **Data Processing and Deduplication** We us IP
2024
- Address & User-Agent combination. Each unique combination of IP address and
2025
- User-Agent string might be considered a unique viewer. This approach allows to
2026
- accurately estimate the number of unique viewers. However, this is not
2027
- foolproof due to NAT (Network Address Translation) and shared networks. Thus
2028
- if your users fall under such restrictions, then the number of unique viewers
2029
- may be higher than calculated. **Why is there no "Unique Views" method?**
2030
- Based on CDN data, we can calculate the number of unique viewers only. Thus
2031
- only your player will be able to count the number of unique views (clicks on
2032
- the Play button) within the player session (i.e. how many times 1 unique
2033
- viewer clicked the Play button within a unique player's session).
2159
+ - But this method tracks all viewers from everywhere.
2160
+
2161
+ This method is a combination of two other Live and VOD detailed methods. If you
2162
+ need detailed information, then see the methods: `/statistics/stream/viewers`
2163
+ and `/statistics/vod/viewers`.
2164
+
2165
+ **Data Processing and Deduplication**
2166
+
2167
+ We us IP Address & User-Agent combination. Each unique combination of IP address
2168
+ and User-Agent string might be considered a unique viewer.
2169
+
2170
+ This approach allows to accurately estimate the number of unique viewers.
2171
+ However, this is not foolproof due to NAT (Network Address Translation) and
2172
+ shared networks. Thus if your users fall under such restrictions, then the
2173
+ number of unique viewers may be higher than calculated.
2174
+
2175
+ **Why is there no "Unique Views" method?**
2176
+
2177
+ Based on CDN data, we can calculate the number of unique viewers only. Thus only
2178
+ your player will be able to count the number of unique views (clicks on the Play
2179
+ button) within the player session (i.e. how many times 1 unique viewer clicked
2180
+ the Play button within a unique player's session).
2034
2181
 
2035
2182
  Args:
2036
2183
  date_from: Start of time frame. Format is date time in ISO 8601.
@@ -2038,10 +2185,13 @@ class AsyncStatisticsResource(AsyncAPIResource):
2038
2185
  date_to: End of time frame. Format is date time in ISO 8601.
2039
2186
 
2040
2187
  id: Filter by entity's id. Put ID of a Live stream, VOD or a playlist to be
2041
- calculated. If the value is omitted, then the calculation is done for all
2042
- videos/streams of the specified type. When using this "id" parameter, be sure to
2043
- specify the "type" parameter too. If you do not specify a type, the "id" will be
2044
- ignored.
2188
+ calculated.
2189
+
2190
+ If the value is omitted, then the calculation is done for all videos/streams of
2191
+ the specified type.
2192
+
2193
+ When using this "id" parameter, be sure to specify the "type" parameter too. If
2194
+ you do not specify a type, the "id" will be ignored.
2045
2195
 
2046
2196
  type: Filter by entity's type
2047
2197
 
@@ -2054,7 +2204,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2054
2204
  timeout: Override the client-level default timeout for this request, in seconds
2055
2205
  """
2056
2206
  return await self._get(
2057
- "/streaming/statistics/cdn/uniqs",
2207
+ "/streaming/statistics/cdn/uniqs"
2208
+ if self._client._base_url_overridden
2209
+ else "https://api.gcore.com//streaming/statistics/cdn/uniqs",
2058
2210
  options=make_request_options(
2059
2211
  extra_headers=extra_headers,
2060
2212
  extra_query=extra_query,
@@ -2078,29 +2230,30 @@ class AsyncStatisticsResource(AsyncAPIResource):
2078
2230
  *,
2079
2231
  date_from: str,
2080
2232
  date_to: str,
2081
- id: str | NotGiven = NOT_GIVEN,
2082
- country: str | NotGiven = NOT_GIVEN,
2083
- event: Literal["init", "start", "watch"] | NotGiven = NOT_GIVEN,
2084
- group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]]
2085
- | NotGiven = NOT_GIVEN,
2086
- host: str | NotGiven = NOT_GIVEN,
2087
- type: Literal["live", "vod", "playlist"] | NotGiven = NOT_GIVEN,
2233
+ id: str | Omit = omit,
2234
+ country: str | Omit = omit,
2235
+ event: Literal["init", "start", "watch"] | Omit = omit,
2236
+ group: List[Literal["host", "os", "browser", "platform", "ip", "country", "event", "id"]] | Omit = omit,
2237
+ host: str | Omit = omit,
2238
+ type: Literal["live", "vod", "playlist"] | Omit = omit,
2088
2239
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2089
2240
  # The extra values given here take precedence over values defined on the client or passed to this method.
2090
2241
  extra_headers: Headers | None = None,
2091
2242
  extra_query: Query | None = None,
2092
2243
  extra_body: Body | None = None,
2093
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2244
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2094
2245
  ) -> Views:
2095
- """Get the number of views in the built-in player.
2246
+ """
2247
+ Get the number of views in the built-in player.
2096
2248
 
2097
- Allows flexible grouping and
2098
- filtering. The fields in the response depend on the selected grouping. Note.
2099
- This method operates only on data collected by the built-in HTML player. It will
2100
- not show statistics if you are using another player or viewing in native OS
2101
- players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
2102
- through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
2103
- you have chosen.
2249
+ Allows flexible grouping and filtering. The fields in the response depend on the
2250
+ selected grouping.
2251
+
2252
+ Note. This method operates only on data collected by the built-in HTML player.
2253
+ It will not show statistics if you are using another player or viewing in native
2254
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2255
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2256
+ the players you have chosen.
2104
2257
 
2105
2258
  Args:
2106
2259
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2128,7 +2281,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2128
2281
  timeout: Override the client-level default timeout for this request, in seconds
2129
2282
  """
2130
2283
  return await self._get(
2131
- "/streaming/statistics/views",
2284
+ "/streaming/statistics/views"
2285
+ if self._client._base_url_overridden
2286
+ else "https://api.gcore.com//streaming/statistics/views",
2132
2287
  options=make_request_options(
2133
2288
  extra_headers=extra_headers,
2134
2289
  extra_query=extra_query,
@@ -2161,15 +2316,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
2161
2316
  extra_headers: Headers | None = None,
2162
2317
  extra_query: Query | None = None,
2163
2318
  extra_body: Body | None = None,
2164
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2319
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2165
2320
  ) -> ViewsByBrowser:
2166
2321
  """
2167
2322
  Aggregates the number of views for all client videos, grouping them by browsers
2168
- in the built-in player. Note. This method operates only on data collected by the
2169
- built-in HTML player. It will not show statistics if you are using another
2170
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
2171
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
2172
- or statistics of the players you have chosen.
2323
+ in the built-in player.
2324
+
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.
2173
2330
 
2174
2331
  Args:
2175
2332
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2185,7 +2342,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2185
2342
  timeout: Override the client-level default timeout for this request, in seconds
2186
2343
  """
2187
2344
  return await self._get(
2188
- "/streaming/statistics/browsers",
2345
+ "/streaming/statistics/browsers"
2346
+ if self._client._base_url_overridden
2347
+ else "https://api.gcore.com//streaming/statistics/browsers",
2189
2348
  options=make_request_options(
2190
2349
  extra_headers=extra_headers,
2191
2350
  extra_query=extra_query,
@@ -2212,10 +2371,11 @@ class AsyncStatisticsResource(AsyncAPIResource):
2212
2371
  extra_headers: Headers | None = None,
2213
2372
  extra_query: Query | None = None,
2214
2373
  extra_body: Body | None = None,
2215
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2374
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2216
2375
  ) -> ViewsByCountry:
2217
2376
  """
2218
2377
  Aggregates the number of views grouping them by country in the built-in player.
2378
+
2219
2379
  Note. This method operates only on data collected by the built-in HTML player.
2220
2380
  It will not show statistics if you are using another player or viewing in native
2221
2381
  OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
@@ -2236,7 +2396,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2236
2396
  timeout: Override the client-level default timeout for this request, in seconds
2237
2397
  """
2238
2398
  return await self._get(
2239
- "/streaming/statistics/countries",
2399
+ "/streaming/statistics/countries"
2400
+ if self._client._base_url_overridden
2401
+ else "https://api.gcore.com//streaming/statistics/countries",
2240
2402
  options=make_request_options(
2241
2403
  extra_headers=extra_headers,
2242
2404
  extra_query=extra_query,
@@ -2263,15 +2425,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
2263
2425
  extra_headers: Headers | None = None,
2264
2426
  extra_query: Query | None = None,
2265
2427
  extra_body: Body | None = None,
2266
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2428
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2267
2429
  ) -> ViewsByHostname:
2268
2430
  """
2269
2431
  Aggregates the number of views, grouping them by "host" domain name the built-in
2270
- player was embeded to. Note. This method operates only on data collected by the
2271
- built-in HTML player. It will not show statistics if you are using another
2272
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
2273
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
2274
- or statistics of the players you have chosen.
2432
+ player was embeded to.
2433
+
2434
+ Note. This method operates only on data collected by the built-in HTML player.
2435
+ It will not show statistics if you are using another player or viewing in native
2436
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2437
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2438
+ the players you have chosen.
2275
2439
 
2276
2440
  Args:
2277
2441
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2287,7 +2451,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2287
2451
  timeout: Override the client-level default timeout for this request, in seconds
2288
2452
  """
2289
2453
  return await self._get(
2290
- "/streaming/statistics/hosts",
2454
+ "/streaming/statistics/hosts"
2455
+ if self._client._base_url_overridden
2456
+ else "https://api.gcore.com//streaming/statistics/hosts",
2291
2457
  options=make_request_options(
2292
2458
  extra_headers=extra_headers,
2293
2459
  extra_query=extra_query,
@@ -2314,15 +2480,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
2314
2480
  extra_headers: Headers | None = None,
2315
2481
  extra_query: Query | None = None,
2316
2482
  extra_body: Body | None = None,
2317
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2483
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2318
2484
  ) -> ViewsByOperatingSystem:
2319
2485
  """
2320
2486
  Aggregates the number of views for all client videos, grouping them by device
2321
- OSs in the built-in player. Note. This method operates only on data collected by
2322
- the built-in HTML player. It will not show statistics if you are using another
2323
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
2324
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
2325
- or statistics of the players you have chosen.
2487
+ OSs in the built-in player.
2488
+
2489
+ Note. This method operates only on data collected by the built-in HTML player.
2490
+ It will not show statistics if you are using another player or viewing in native
2491
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2492
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2493
+ the players you have chosen.
2326
2494
 
2327
2495
  Args:
2328
2496
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2338,7 +2506,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2338
2506
  timeout: Override the client-level default timeout for this request, in seconds
2339
2507
  """
2340
2508
  return await self._get(
2341
- "/streaming/statistics/systems",
2509
+ "/streaming/statistics/systems"
2510
+ if self._client._base_url_overridden
2511
+ else "https://api.gcore.com//streaming/statistics/systems",
2342
2512
  options=make_request_options(
2343
2513
  extra_headers=extra_headers,
2344
2514
  extra_query=extra_query,
@@ -2365,15 +2535,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
2365
2535
  extra_headers: Headers | None = None,
2366
2536
  extra_query: Query | None = None,
2367
2537
  extra_body: Body | None = None,
2368
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2538
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2369
2539
  ) -> ViewsByReferer:
2370
2540
  """
2371
2541
  Aggregates the number of views, grouping them by "referer" URL of pages the
2372
- built-in player was embeded to. Note. This method operates only on data
2373
- collected by the built-in HTML player. It will not show statistics if you are
2374
- using another player or viewing in native OS players through direct
2375
- .m3u8/.mpd/.mp4 links. For such cases, use calculations through CDN (look at
2376
- method /statistics/cdn/uniqs) or statistics of the players you have chosen.
2542
+ built-in player was embeded to.
2543
+
2544
+ Note. This method operates only on data collected by the built-in HTML player.
2545
+ It will not show statistics if you are using another player or viewing in native
2546
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2547
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2548
+ the players you have chosen.
2377
2549
 
2378
2550
  Args:
2379
2551
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2389,7 +2561,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2389
2561
  timeout: Override the client-level default timeout for this request, in seconds
2390
2562
  """
2391
2563
  return await self._get(
2392
- "/streaming/statistics/embeds",
2564
+ "/streaming/statistics/embeds"
2565
+ if self._client._base_url_overridden
2566
+ else "https://api.gcore.com//streaming/statistics/embeds",
2393
2567
  options=make_request_options(
2394
2568
  extra_headers=extra_headers,
2395
2569
  extra_query=extra_query,
@@ -2416,15 +2590,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
2416
2590
  extra_headers: Headers | None = None,
2417
2591
  extra_query: Query | None = None,
2418
2592
  extra_body: Body | None = None,
2419
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2593
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2420
2594
  ) -> ViewsByRegion:
2421
2595
  """
2422
2596
  Aggregates the number of views grouping them by regions of countries in the
2423
- built-in player. Note. This method operates only on data collected by the
2424
- built-in HTML player. It will not show statistics if you are using another
2425
- player or viewing in native OS players through direct .m3u8/.mpd/.mp4 links. For
2426
- such cases, use calculations through CDN (look at method /statistics/cdn/uniqs)
2427
- or statistics of the players you have chosen.
2597
+ built-in player.
2598
+
2599
+ Note. This method operates only on data collected by the built-in HTML player.
2600
+ It will not show statistics if you are using another player or viewing in native
2601
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2602
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2603
+ the players you have chosen.
2428
2604
 
2429
2605
  Args:
2430
2606
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2440,7 +2616,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2440
2616
  timeout: Override the client-level default timeout for this request, in seconds
2441
2617
  """
2442
2618
  return await self._get(
2443
- "/streaming/statistics/regions",
2619
+ "/streaming/statistics/regions"
2620
+ if self._client._base_url_overridden
2621
+ else "https://api.gcore.com//streaming/statistics/regions",
2444
2622
  options=make_request_options(
2445
2623
  extra_headers=extra_headers,
2446
2624
  extra_query=extra_query,
@@ -2469,18 +2647,22 @@ class AsyncStatisticsResource(AsyncAPIResource):
2469
2647
  extra_headers: Headers | None = None,
2470
2648
  extra_query: Query | None = None,
2471
2649
  extra_body: Body | None = None,
2472
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2650
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2473
2651
  ) -> ViewsHeatmap:
2474
2652
  """
2475
2653
  Shows information about what part of the video your viewers watched in the
2476
- built-in player. This way you can find out how many viewers started watching the
2477
- video, and where they stopped watching instead of watching the entire video to
2478
- the end. Has different format of response depends on query param "type". Note.
2479
- This method operates only on data collected by the built-in HTML player. It will
2480
- not show statistics if you are using another player or viewing in native OS
2481
- players through direct .m3u8/.mpd/.mp4 links. For such cases, use calculations
2482
- through CDN (look at method /statistics/cdn/uniqs) or statistics of the players
2483
- you have chosen.
2654
+ built-in player.
2655
+
2656
+ This way you can find out how many viewers started watching the video, and where
2657
+ they stopped watching instead of watching the entire video to the end.
2658
+
2659
+ Has different format of response depends on query param "type".
2660
+
2661
+ Note. This method operates only on data collected by the built-in HTML player.
2662
+ It will not show statistics if you are using another player or viewing in native
2663
+ OS players through direct .m3u8/.mpd/.mp4 links. For such cases, use
2664
+ calculations through CDN (look at method /statistics/cdn/uniqs) or statistics of
2665
+ the players you have chosen.
2484
2666
 
2485
2667
  Args:
2486
2668
  date_from: Start of time frame. Datetime in ISO 8601 format.
@@ -2500,7 +2682,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2500
2682
  timeout: Override the client-level default timeout for this request, in seconds
2501
2683
  """
2502
2684
  return await self._get(
2503
- "/streaming/statistics/heatmap",
2685
+ "/streaming/statistics/heatmap"
2686
+ if self._client._base_url_overridden
2687
+ else "https://api.gcore.com//streaming/statistics/heatmap",
2504
2688
  options=make_request_options(
2505
2689
  extra_headers=extra_headers,
2506
2690
  extra_query=extra_query,
@@ -2529,12 +2713,14 @@ class AsyncStatisticsResource(AsyncAPIResource):
2529
2713
  extra_headers: Headers | None = None,
2530
2714
  extra_query: Query | None = None,
2531
2715
  extra_body: Body | None = None,
2532
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2716
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2533
2717
  ) -> VodStatisticsSeries:
2534
2718
  """
2535
2719
  Calculates time series of the duration in minutes for all processed and
2536
- undeleted client videos. The data is updated every 8 hours, it does not make
2537
- sense to set the granulation less than 1 day.
2720
+ undeleted client videos.
2721
+
2722
+ The data is updated every 8 hours, it does not make sense to set the granulation
2723
+ less than 1 day.
2538
2724
 
2539
2725
  Args:
2540
2726
  from_: Start of time frame. Datetime in ISO 8601 format.
@@ -2550,7 +2736,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2550
2736
  timeout: Override the client-level default timeout for this request, in seconds
2551
2737
  """
2552
2738
  return await self._get(
2553
- "/streaming/statistics/vod/storage_duration",
2739
+ "/streaming/statistics/vod/storage_duration"
2740
+ if self._client._base_url_overridden
2741
+ else "https://api.gcore.com//streaming/statistics/vod/storage_duration",
2554
2742
  options=make_request_options(
2555
2743
  extra_headers=extra_headers,
2556
2744
  extra_query=extra_query,
@@ -2577,12 +2765,14 @@ class AsyncStatisticsResource(AsyncAPIResource):
2577
2765
  extra_headers: Headers | None = None,
2578
2766
  extra_query: Query | None = None,
2579
2767
  extra_body: Body | None = None,
2580
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2768
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2581
2769
  ) -> VodStatisticsSeries:
2582
2770
  """
2583
2771
  Calculates time series of the transcoding time in minutes for all processed
2584
- client videos. The data is updated every 8 hours, it does not make sense to set
2585
- the granulation less than 1 day.
2772
+ client videos.
2773
+
2774
+ The data is updated every 8 hours, it does not make sense to set the granulation
2775
+ less than 1 day.
2586
2776
 
2587
2777
  Args:
2588
2778
  from_: Start of time frame. Datetime in ISO 8601 format.
@@ -2598,7 +2788,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2598
2788
  timeout: Override the client-level default timeout for this request, in seconds
2599
2789
  """
2600
2790
  return await self._get(
2601
- "/streaming/statistics/vod/transcoding_duration",
2791
+ "/streaming/statistics/vod/transcoding_duration"
2792
+ if self._client._base_url_overridden
2793
+ else "https://api.gcore.com//streaming/statistics/vod/transcoding_duration",
2602
2794
  options=make_request_options(
2603
2795
  extra_headers=extra_headers,
2604
2796
  extra_query=extra_query,
@@ -2620,23 +2812,27 @@ class AsyncStatisticsResource(AsyncAPIResource):
2620
2812
  *,
2621
2813
  from_: str,
2622
2814
  to: str,
2623
- client_user_id: int | NotGiven = NOT_GIVEN,
2624
- granularity: Literal["1m", "5m", "15m", "1h", "1d"] | NotGiven = NOT_GIVEN,
2625
- slug: str | NotGiven = NOT_GIVEN,
2815
+ client_user_id: int | Omit = omit,
2816
+ granularity: Literal["1m", "5m", "15m", "1h", "1d"] | Omit = omit,
2817
+ slug: str | Omit = omit,
2626
2818
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2627
2819
  # The extra values given here take precedence over values defined on the client or passed to this method.
2628
2820
  extra_headers: Headers | None = None,
2629
2821
  extra_query: Query | None = None,
2630
2822
  extra_body: Body | None = None,
2631
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2823
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2632
2824
  ) -> VodStatisticsSeries:
2633
- """Calculates time series of unique viewers of VOD via CDN.
2825
+ """
2826
+ Calculates time series of unique viewers of VOD via CDN.
2827
+
2828
+ The statistics are taken from the data of CDN and work regardless of which
2829
+ player the views were made with.
2830
+
2831
+ Works similar to the method `/statistics/cdn/uniqs`. But this allows you to
2832
+ break down data with the specified granularity: minutes, hours, days.
2634
2833
 
2635
- The statistics are
2636
- taken from the data of CDN and work regardless of which player the views were
2637
- made with. Works similar to the method `/statistics/cdn/uniqs`. But this allows
2638
- you to break down data with the specified granularity: minutes, hours, days.
2639
2834
  Based on this method, a graph of unique views in the Customer Portal is built.
2835
+
2640
2836
  ![Unique viewers via CDN in Customer Portal](https://demo-files.gvideo.io/apidocs/cdn_unique_viewers.png)
2641
2837
 
2642
2838
  Args:
@@ -2659,7 +2855,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2659
2855
  timeout: Override the client-level default timeout for this request, in seconds
2660
2856
  """
2661
2857
  return await self._get(
2662
- "/streaming/statistics/vod/viewers",
2858
+ "/streaming/statistics/vod/viewers"
2859
+ if self._client._base_url_overridden
2860
+ else "https://api.gcore.com//streaming/statistics/vod/viewers",
2663
2861
  options=make_request_options(
2664
2862
  extra_headers=extra_headers,
2665
2863
  extra_query=extra_query,
@@ -2683,25 +2881,28 @@ class AsyncStatisticsResource(AsyncAPIResource):
2683
2881
  self,
2684
2882
  *,
2685
2883
  from_: str,
2686
- client_user_id: int | NotGiven = NOT_GIVEN,
2687
- granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | NotGiven = NOT_GIVEN,
2688
- slug: str | NotGiven = NOT_GIVEN,
2689
- to: str | NotGiven = NOT_GIVEN,
2884
+ client_user_id: int | Omit = omit,
2885
+ granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"] | Omit = omit,
2886
+ slug: str | Omit = omit,
2887
+ to: str | Omit = omit,
2690
2888
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2691
2889
  # The extra values given here take precedence over values defined on the client or passed to this method.
2692
2890
  extra_headers: Headers | None = None,
2693
2891
  extra_query: Query | None = None,
2694
2892
  extra_body: Body | None = None,
2695
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2893
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2696
2894
  ) -> VodStatisticsSeries:
2697
2895
  """Calculates a time series of video watching duration in minutes.
2698
2896
 
2699
2897
  Views of only
2700
- those videos that meet the specified filters are summed up. The statistics are
2701
- taken from the data of CDN and work regardless of which player the views were
2702
- made with. Please note that the result for each time interval is in minutes, it
2703
- is rounded to the nearest upper integer. You cannot use the sum of all intervals
2704
- as the total watch time value; instead, use the /total method.
2898
+ those videos that meet the specified filters are summed up.
2899
+
2900
+ The statistics are taken from the data of CDN and work regardless of which
2901
+ player the views were made with.
2902
+
2903
+ Please note that the result for each time interval is in minutes, it is rounded
2904
+ to the nearest upper integer. You cannot use the sum of all intervals as the
2905
+ total watch time value; instead, use the /total method.
2705
2906
 
2706
2907
  Args:
2707
2908
  from_: Start of the time period for counting minutes of watching. Format is date time
@@ -2725,7 +2926,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2725
2926
  timeout: Override the client-level default timeout for this request, in seconds
2726
2927
  """
2727
2928
  return await self._get(
2728
- "/streaming/statistics/vod/watching_duration",
2929
+ "/streaming/statistics/vod/watching_duration"
2930
+ if self._client._base_url_overridden
2931
+ else "https://api.gcore.com//streaming/statistics/vod/watching_duration",
2729
2932
  options=make_request_options(
2730
2933
  extra_headers=extra_headers,
2731
2934
  extra_query=extra_query,
@@ -2748,23 +2951,24 @@ class AsyncStatisticsResource(AsyncAPIResource):
2748
2951
  async def get_vod_watch_time_total_cdn(
2749
2952
  self,
2750
2953
  *,
2751
- client_user_id: int | NotGiven = NOT_GIVEN,
2752
- from_: str | NotGiven = NOT_GIVEN,
2753
- slug: str | NotGiven = NOT_GIVEN,
2754
- to: str | NotGiven = NOT_GIVEN,
2954
+ client_user_id: int | Omit = omit,
2955
+ from_: str | Omit = omit,
2956
+ slug: str | Omit = omit,
2957
+ to: str | Omit = omit,
2755
2958
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2756
2959
  # The extra values given here take precedence over values defined on the client or passed to this method.
2757
2960
  extra_headers: Headers | None = None,
2758
2961
  extra_query: Query | None = None,
2759
2962
  extra_body: Body | None = None,
2760
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2963
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
2761
2964
  ) -> StatisticGetVodWatchTimeTotalCdnResponse:
2762
2965
  """Calculates the total duration of video watching in minutes.
2763
2966
 
2764
2967
  Views of only those
2765
- videos that meet the specified filters are summed up. The statistics are taken
2766
- from the data of CDN and work regardless of which player the views were made
2767
- with.
2968
+ videos that meet the specified filters are summed up.
2969
+
2970
+ The statistics are taken from the data of CDN and work regardless of which
2971
+ player the views were made with.
2768
2972
 
2769
2973
  Args:
2770
2974
  client_user_id: Filter by field "`client_user_id`"
@@ -2786,7 +2990,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
2786
2990
  timeout: Override the client-level default timeout for this request, in seconds
2787
2991
  """
2788
2992
  return await self._get(
2789
- "/streaming/statistics/vod/watching_duration/total",
2993
+ "/streaming/statistics/vod/watching_duration/total"
2994
+ if self._client._base_url_overridden
2995
+ else "https://api.gcore.com//streaming/statistics/vod/watching_duration/total",
2790
2996
  options=make_request_options(
2791
2997
  extra_headers=extra_headers,
2792
2998
  extra_query=extra_query,