chunkify-analytics-sdk 0.9.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.
- chunkify_analytics/__init__.py +102 -0
- chunkify_analytics/_base_client.py +2153 -0
- chunkify_analytics/_client.py +1262 -0
- chunkify_analytics/_compat.py +226 -0
- chunkify_analytics/_constants.py +14 -0
- chunkify_analytics/_exceptions.py +108 -0
- chunkify_analytics/_files.py +173 -0
- chunkify_analytics/_models.py +964 -0
- chunkify_analytics/_qs.py +149 -0
- chunkify_analytics/_resource.py +43 -0
- chunkify_analytics/_response.py +835 -0
- chunkify_analytics/_streaming.py +338 -0
- chunkify_analytics/_types.py +274 -0
- chunkify_analytics/_utils/__init__.py +64 -0
- chunkify_analytics/_utils/_compat.py +45 -0
- chunkify_analytics/_utils/_datetime_parse.py +136 -0
- chunkify_analytics/_utils/_json.py +35 -0
- chunkify_analytics/_utils/_logs.py +25 -0
- chunkify_analytics/_utils/_path.py +127 -0
- chunkify_analytics/_utils/_proxy.py +65 -0
- chunkify_analytics/_utils/_reflection.py +42 -0
- chunkify_analytics/_utils/_resources_proxy.py +24 -0
- chunkify_analytics/_utils/_streams.py +12 -0
- chunkify_analytics/_utils/_sync.py +58 -0
- chunkify_analytics/_utils/_transform.py +457 -0
- chunkify_analytics/_utils/_typing.py +156 -0
- chunkify_analytics/_utils/_utils.py +433 -0
- chunkify_analytics/_version.py +4 -0
- chunkify_analytics/lib/.keep +4 -0
- chunkify_analytics/pagination.py +221 -0
- chunkify_analytics/py.typed +0 -0
- chunkify_analytics/resources/__init__.py +243 -0
- chunkify_analytics/resources/admin/__init__.py +33 -0
- chunkify_analytics/resources/admin/admin.py +253 -0
- chunkify_analytics/resources/admin/keys.py +283 -0
- chunkify_analytics/resources/dimensions.py +436 -0
- chunkify_analytics/resources/engagement.py +479 -0
- chunkify_analytics/resources/errors.py +400 -0
- chunkify_analytics/resources/events.py +562 -0
- chunkify_analytics/resources/exports.py +584 -0
- chunkify_analytics/resources/health.py +159 -0
- chunkify_analytics/resources/playback_rates.py +391 -0
- chunkify_analytics/resources/project/__init__.py +33 -0
- chunkify_analytics/resources/project/keys.py +379 -0
- chunkify_analytics/resources/project/project.py +322 -0
- chunkify_analytics/resources/quality.py +471 -0
- chunkify_analytics/resources/renditions.py +391 -0
- chunkify_analytics/resources/retention.py +377 -0
- chunkify_analytics/resources/subtitles.py +389 -0
- chunkify_analytics/resources/summary.py +469 -0
- chunkify_analytics/resources/timeseries.py +399 -0
- chunkify_analytics/resources/videos.py +424 -0
- chunkify_analytics/resources/views.py +579 -0
- chunkify_analytics/types/__init__.py +145 -0
- chunkify_analytics/types/admin/__init__.py +3 -0
- chunkify_analytics/types/admin_create_project_params.py +25 -0
- chunkify_analytics/types/analytics_event.py +32 -0
- chunkify_analytics/types/analytics_event_param.py +30 -0
- chunkify_analytics/types/created_project.py +37 -0
- chunkify_analytics/types/created_project_key.py +34 -0
- chunkify_analytics/types/deleted_project.py +18 -0
- chunkify_analytics/types/dimension_list_values_params.py +124 -0
- chunkify_analytics/types/dimension_values.py +42 -0
- chunkify_analytics/types/engagement.py +60 -0
- chunkify_analytics/types/engagement_breakdown_page.py +44 -0
- chunkify_analytics/types/engagement_response.py +11 -0
- chunkify_analytics/types/engagement_retrieve_params.py +158 -0
- chunkify_analytics/types/engagement_timeseries.py +28 -0
- chunkify_analytics/types/engagement_timeseries_bucket.py +63 -0
- chunkify_analytics/types/error_group.py +17 -0
- chunkify_analytics/types/error_list_params.py +124 -0
- chunkify_analytics/types/error_page.py +14 -0
- chunkify_analytics/types/event_ingest_params.py +19 -0
- chunkify_analytics/types/event_ingest_response.py +11 -0
- chunkify_analytics/types/event_list_params.py +146 -0
- chunkify_analytics/types/event_page.py +18 -0
- chunkify_analytics/types/export.py +18 -0
- chunkify_analytics/types/export_columns.py +12 -0
- chunkify_analytics/types/export_create_params.py +40 -0
- chunkify_analytics/types/export_download_response.py +7 -0
- chunkify_analytics/types/export_list_columns_params.py +69 -0
- chunkify_analytics/types/export_query_param.py +141 -0
- chunkify_analytics/types/health.py +11 -0
- chunkify_analytics/types/metrics.py +13 -0
- chunkify_analytics/types/metrics_breakdown_page.py +40 -0
- chunkify_analytics/types/metrics_response.py +11 -0
- chunkify_analytics/types/native_created.py +13 -0
- chunkify_analytics/types/native_duplicate.py +13 -0
- chunkify_analytics/types/playback_error.py +180 -0
- chunkify_analytics/types/playback_error_param.py +182 -0
- chunkify_analytics/types/playback_rate_changed.py +150 -0
- chunkify_analytics/types/playback_rate_changed_param.py +152 -0
- chunkify_analytics/types/playback_rate_metric.py +21 -0
- chunkify_analytics/types/playback_rate_report.py +31 -0
- chunkify_analytics/types/playback_rate_retrieve_params.py +117 -0
- chunkify_analytics/types/playback_state_changed.py +150 -0
- chunkify_analytics/types/playback_state_changed_param.py +156 -0
- chunkify_analytics/types/project/__init__.py +6 -0
- chunkify_analytics/types/project/key_create_params.py +21 -0
- chunkify_analytics/types/project/project.py +35 -0
- chunkify_analytics/types/project_key.py +21 -0
- chunkify_analytics/types/project_keys.py +14 -0
- chunkify_analytics/types/project_update_params.py +25 -0
- chunkify_analytics/types/quality.py +117 -0
- chunkify_analytics/types/quality_breakdown_page.py +44 -0
- chunkify_analytics/types/quality_response.py +11 -0
- chunkify_analytics/types/quality_retrieve_params.py +158 -0
- chunkify_analytics/types/quality_timeseries.py +28 -0
- chunkify_analytics/types/quality_timeseries_bucket.py +120 -0
- chunkify_analytics/types/rendition_changed.py +156 -0
- chunkify_analytics/types/rendition_changed_param.py +158 -0
- chunkify_analytics/types/rendition_metric.py +40 -0
- chunkify_analytics/types/rendition_report.py +43 -0
- chunkify_analytics/types/rendition_retrieve_params.py +117 -0
- chunkify_analytics/types/retention_bucket.py +22 -0
- chunkify_analytics/types/retention_report.py +33 -0
- chunkify_analytics/types/retention_retrieve_params.py +110 -0
- chunkify_analytics/types/rotated_project_key.py +29 -0
- chunkify_analytics/types/seek_completed.py +166 -0
- chunkify_analytics/types/seek_completed_param.py +168 -0
- chunkify_analytics/types/shared/__init__.py +24 -0
- chunkify_analytics/types/shared/browser_context.py +62 -0
- chunkify_analytics/types/shared/custom_dimensions.py +8 -0
- chunkify_analytics/types/shared/event_context.py +161 -0
- chunkify_analytics/types/shared/event_envelope.py +152 -0
- chunkify_analytics/types/shared/metric_count_ratio.py +18 -0
- chunkify_analytics/types/shared/otlp_any_value.py +56 -0
- chunkify_analytics/types/shared/otlp_attribute.py +24 -0
- chunkify_analytics/types/shared/otlp_attribute_value.py +136 -0
- chunkify_analytics/types/shared/otlp_context_attribute.py +22 -0
- chunkify_analytics/types/shared/otlp_log_record.py +48 -0
- chunkify_analytics/types/shared/otlp_resource.py +20 -0
- chunkify_analytics/types/shared/otlp_scope.py +24 -0
- chunkify_analytics/types/shared/playback_rate_playing_time.py +12 -0
- chunkify_analytics/types/shared/playback_score.py +28 -0
- chunkify_analytics/types/shared/played_range.py +13 -0
- chunkify_analytics/types/shared/progress_reached.py +39 -0
- chunkify_analytics/types/shared/rendition_playing_time.py +21 -0
- chunkify_analytics/types/shared/startup_outcomes.py +39 -0
- chunkify_analytics/types/shared/stored_otlp_context.py +50 -0
- chunkify_analytics/types/shared/subtitle_playing_time.py +14 -0
- chunkify_analytics/types/shared/view_metrics.py +100 -0
- chunkify_analytics/types/shared/watch_time_distribution.py +41 -0
- chunkify_analytics/types/shared_params/__init__.py +8 -0
- chunkify_analytics/types/shared_params/browser_context.py +62 -0
- chunkify_analytics/types/shared_params/custom_dimensions.py +10 -0
- chunkify_analytics/types/shared_params/playback_rate_playing_time.py +14 -0
- chunkify_analytics/types/shared_params/played_range.py +15 -0
- chunkify_analytics/types/shared_params/rendition_playing_time.py +22 -0
- chunkify_analytics/types/shared_params/subtitle_playing_time.py +15 -0
- chunkify_analytics/types/stored_event.py +44 -0
- chunkify_analytics/types/subtitle_changed.py +150 -0
- chunkify_analytics/types/subtitle_changed_param.py +152 -0
- chunkify_analytics/types/subtitle_metric.py +26 -0
- chunkify_analytics/types/subtitle_report.py +31 -0
- chunkify_analytics/types/subtitle_retrieve_params.py +117 -0
- chunkify_analytics/types/summary_retrieve_params.py +158 -0
- chunkify_analytics/types/time_bucket.py +22 -0
- chunkify_analytics/types/timeseries.py +28 -0
- chunkify_analytics/types/timeseries_response.py +12 -0
- chunkify_analytics/types/timesery_retrieve_params.py +115 -0
- chunkify_analytics/types/video_list_params.py +140 -0
- chunkify_analytics/types/video_metrics.py +23 -0
- chunkify_analytics/types/video_page.py +14 -0
- chunkify_analytics/types/view.py +43 -0
- chunkify_analytics/types/view_detail.py +21 -0
- chunkify_analytics/types/view_ended.py +180 -0
- chunkify_analytics/types/view_ended_param.py +182 -0
- chunkify_analytics/types/view_list_params.py +152 -0
- chunkify_analytics/types/view_page.py +14 -0
- chunkify_analytics/types/view_retrieve_params.py +23 -0
- chunkify_analytics/types/view_snapshot.py +180 -0
- chunkify_analytics/types/view_snapshot_param.py +182 -0
- chunkify_analytics/types/view_started.py +192 -0
- chunkify_analytics/types/view_started_param.py +194 -0
- chunkify_analytics_sdk-0.9.0.dist-info/METADATA +487 -0
- chunkify_analytics_sdk-0.9.0.dist-info/RECORD +179 -0
- chunkify_analytics_sdk-0.9.0.dist-info/WHEEL +4 -0
- chunkify_analytics_sdk-0.9.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.playback_score import PlaybackScore
|
|
8
|
+
from .shared.startup_outcomes import StartupOutcomes
|
|
9
|
+
|
|
10
|
+
__all__ = ["QualityTimeseriesBucket", "Buffering", "FatalErrors", "StartupTimeMs"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Buffering(BaseModel):
|
|
14
|
+
"""Duration-weighted buffering.
|
|
15
|
+
|
|
16
|
+
Startup wait, pauses and seeking are excluded by the SDK. Unknown durations are not treated as zero.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
ratio: Optional[float] = None
|
|
20
|
+
"""Total rebuffer time divided by combined playing and rebuffer time.
|
|
21
|
+
|
|
22
|
+
Null without samples. Multiply by 100 for percent.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
sample_views: int
|
|
26
|
+
"""
|
|
27
|
+
Views with playing and rebuffer durations available and positive combined
|
|
28
|
+
duration.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
total_playing_time_ms: float
|
|
32
|
+
"""Sum of playing time for eligible buffering samples only."""
|
|
33
|
+
|
|
34
|
+
total_rebuffer_duration_ms: float
|
|
35
|
+
"""Sum of rebuffer time for the same samples."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class FatalErrors(BaseModel):
|
|
39
|
+
"""Observed fatal errors.
|
|
40
|
+
|
|
41
|
+
Lost events can undercount this metric; absence of an error is not proof of successful playback.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
affected_views: int
|
|
45
|
+
"""
|
|
46
|
+
Distinct selected views with at least one observed matching fatal
|
|
47
|
+
playback_error, including before playback starts.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
ratio: Optional[float] = None
|
|
51
|
+
"""Affected views divided by all selected attempts; null when views is zero.
|
|
52
|
+
|
|
53
|
+
Multiply by 100 for percent.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class StartupTimeMs(BaseModel):
|
|
58
|
+
"""Time from attempt to first playing, measured once per eligible view.
|
|
59
|
+
|
|
60
|
+
This is not first-frame timing.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
median: Optional[float] = None
|
|
64
|
+
"""Continuous median startup time in milliseconds, or null without samples."""
|
|
65
|
+
|
|
66
|
+
p95: Optional[float] = None
|
|
67
|
+
"""
|
|
68
|
+
Continuous 95th percentile startup time in milliseconds, or null without
|
|
69
|
+
samples.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
sample_views: int
|
|
73
|
+
"""
|
|
74
|
+
Views with a non-null startup measurement on the selected final event or latest
|
|
75
|
+
snapshot.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class QualityTimeseriesBucket(BaseModel):
|
|
80
|
+
"""Playback quality for the same start cohort as summary.
|
|
81
|
+
|
|
82
|
+
All rates are fractions. Counts expose measurement coverage.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
bucket_start: datetime
|
|
86
|
+
|
|
87
|
+
buffering: Buffering
|
|
88
|
+
"""Duration-weighted buffering.
|
|
89
|
+
|
|
90
|
+
Startup wait, pauses and seeking are excluded by the SDK. Unknown durations are
|
|
91
|
+
not treated as zero.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
fatal_errors: FatalErrors
|
|
95
|
+
"""Observed fatal errors.
|
|
96
|
+
|
|
97
|
+
Lost events can undercount this metric; absence of an error is not proof of
|
|
98
|
+
successful playback.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
playback_score: PlaybackScore
|
|
102
|
+
|
|
103
|
+
startup_outcomes: StartupOutcomes
|
|
104
|
+
"""Mutually exclusive outcomes.
|
|
105
|
+
|
|
106
|
+
An explicit startup_outcome on the selected final event takes precedence.
|
|
107
|
+
Otherwise an available startup time, including zero, or positive playing time on
|
|
108
|
+
the selected measurement proves started. All other views are unknown.
|
|
109
|
+
sample_views excludes unknown; every ratio uses all selected attempts, including
|
|
110
|
+
unknown. Missing final delivery does not prove an exit or failure.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
startup_time_ms: StartupTimeMs
|
|
114
|
+
"""Time from attempt to first playing, measured once per eligible view.
|
|
115
|
+
|
|
116
|
+
This is not first-frame timing.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
views: int
|
|
120
|
+
"""Selected playback attempts with a retained start, including failed attempts."""
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .shared.browser_context import BrowserContext
|
|
9
|
+
from .shared.rendition_playing_time import RenditionPlayingTime
|
|
10
|
+
|
|
11
|
+
__all__ = ["RenditionChanged"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RenditionChanged(BaseModel):
|
|
15
|
+
connector_name: str
|
|
16
|
+
|
|
17
|
+
connector_version: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
delivery_hostname: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
environment: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
error_category: Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]] = None
|
|
24
|
+
|
|
25
|
+
error_code: Union[str, float, None] = None
|
|
26
|
+
|
|
27
|
+
error_fatal: Optional[bool] = None
|
|
28
|
+
|
|
29
|
+
error_playhead_seconds: Optional[float] = None
|
|
30
|
+
|
|
31
|
+
event_id: str
|
|
32
|
+
|
|
33
|
+
event_name: Literal["chunkify.video.rendition_changed"]
|
|
34
|
+
|
|
35
|
+
occurred_at: datetime
|
|
36
|
+
|
|
37
|
+
player_height_px: Optional[float] = None
|
|
38
|
+
|
|
39
|
+
player_name: Optional[str] = None
|
|
40
|
+
|
|
41
|
+
player_version: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
player_width_px: Optional[float] = None
|
|
44
|
+
|
|
45
|
+
playhead_seconds: Optional[float] = None
|
|
46
|
+
|
|
47
|
+
previous_rendition_bitrate_bps: Optional[float] = None
|
|
48
|
+
|
|
49
|
+
previous_rendition_codec: Optional[str] = None
|
|
50
|
+
|
|
51
|
+
previous_rendition_frame_rate: Optional[float] = None
|
|
52
|
+
|
|
53
|
+
previous_rendition_height: Optional[float] = None
|
|
54
|
+
|
|
55
|
+
previous_rendition_width: Optional[float] = None
|
|
56
|
+
|
|
57
|
+
reason: Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]] = None
|
|
58
|
+
|
|
59
|
+
schema_version: Literal[1]
|
|
60
|
+
|
|
61
|
+
sdk_name: str
|
|
62
|
+
"""Name of the SDK or integration that produced the event.
|
|
63
|
+
|
|
64
|
+
Informational metadata, preserved as received. Must contain at least one
|
|
65
|
+
non-whitespace character.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
sdk_version: str
|
|
69
|
+
|
|
70
|
+
selected_rendition_bitrate_bps: Optional[float] = None
|
|
71
|
+
|
|
72
|
+
selected_rendition_codec: Optional[str] = None
|
|
73
|
+
|
|
74
|
+
selected_rendition_frame_rate: Optional[float] = None
|
|
75
|
+
|
|
76
|
+
selected_rendition_height: Optional[float] = None
|
|
77
|
+
|
|
78
|
+
selected_rendition_width: Optional[float] = None
|
|
79
|
+
|
|
80
|
+
sequence: int
|
|
81
|
+
|
|
82
|
+
startup_outcome: Optional[Literal["started", "failed_before_start", "ended_before_start"]] = None
|
|
83
|
+
|
|
84
|
+
video_id: str
|
|
85
|
+
|
|
86
|
+
view_id: str
|
|
87
|
+
|
|
88
|
+
viewer_id: Optional[str] = None
|
|
89
|
+
"""
|
|
90
|
+
Anonymous browser identifier generated by the Chunkify player SDK and stored in
|
|
91
|
+
the page's localStorage.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
browser_context: Optional[BrowserContext] = None
|
|
95
|
+
"""Browser and device information.
|
|
96
|
+
|
|
97
|
+
The Chunkify player sends every field, with null for unavailable measurements.
|
|
98
|
+
Other integrations may omit any field except schema_version. Extra properties
|
|
99
|
+
are preserved.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
delivery_request_count: Optional[float] = None
|
|
103
|
+
|
|
104
|
+
delivery_throughput_bps: Optional[float] = None
|
|
105
|
+
|
|
106
|
+
delivery_transferred_bytes: Optional[float] = None
|
|
107
|
+
|
|
108
|
+
dropped_video_frames: Optional[float] = None
|
|
109
|
+
|
|
110
|
+
first_video_frame_time_ms: Optional[float] = None
|
|
111
|
+
|
|
112
|
+
furthest_progress_ratio: Optional[float] = None
|
|
113
|
+
|
|
114
|
+
maximum_playhead_seconds: Optional[float] = None
|
|
115
|
+
|
|
116
|
+
media_duration_seconds: Optional[float] = None
|
|
117
|
+
|
|
118
|
+
media_height_px: Optional[float] = None
|
|
119
|
+
|
|
120
|
+
media_width_px: Optional[float] = None
|
|
121
|
+
|
|
122
|
+
playing_time_ms: Optional[float] = None
|
|
123
|
+
|
|
124
|
+
rebuffer_count: Optional[float] = None
|
|
125
|
+
|
|
126
|
+
rebuffer_duration_ms: Optional[float] = None
|
|
127
|
+
|
|
128
|
+
rebuffer_ratio: Optional[float] = None
|
|
129
|
+
|
|
130
|
+
rendition_playing_time: Optional[List[RenditionPlayingTime]] = None
|
|
131
|
+
|
|
132
|
+
rendition_switch_count: Optional[float] = None
|
|
133
|
+
|
|
134
|
+
seek_count: Optional[float] = None
|
|
135
|
+
|
|
136
|
+
seek_duration_ms: Optional[float] = None
|
|
137
|
+
|
|
138
|
+
startup_time_ms: Optional[float] = None
|
|
139
|
+
|
|
140
|
+
total_video_frames: Optional[float] = None
|
|
141
|
+
|
|
142
|
+
user_id: Optional[str] = None
|
|
143
|
+
"""
|
|
144
|
+
Optional integrator-supplied user ID, used to link views to the integrator's own
|
|
145
|
+
users.
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
video_title: Optional[str] = None
|
|
149
|
+
"""Optional human-readable video title for reports."""
|
|
150
|
+
|
|
151
|
+
visibility_state: Optional[Literal["visible", "hidden"]] = None
|
|
152
|
+
"""Tab visibility when the event was recorded.
|
|
153
|
+
|
|
154
|
+
Hidden does not imply paused playback or identify the cause of a pause. Missing
|
|
155
|
+
on older events; null when unavailable.
|
|
156
|
+
"""
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Iterable, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .shared_params.browser_context import BrowserContext
|
|
11
|
+
from .shared_params.rendition_playing_time import RenditionPlayingTime
|
|
12
|
+
|
|
13
|
+
__all__ = ["RenditionChangedParam"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RenditionChangedParam(TypedDict, total=False):
|
|
17
|
+
connector_name: Required[str]
|
|
18
|
+
|
|
19
|
+
connector_version: Required[Optional[str]]
|
|
20
|
+
|
|
21
|
+
delivery_hostname: Required[Optional[str]]
|
|
22
|
+
|
|
23
|
+
environment: Required[Optional[str]]
|
|
24
|
+
|
|
25
|
+
error_category: Required[Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]]]
|
|
26
|
+
|
|
27
|
+
error_code: Required[Union[str, float, None]]
|
|
28
|
+
|
|
29
|
+
error_fatal: Required[Optional[bool]]
|
|
30
|
+
|
|
31
|
+
error_playhead_seconds: Required[Optional[float]]
|
|
32
|
+
|
|
33
|
+
event_id: Required[str]
|
|
34
|
+
|
|
35
|
+
event_name: Required[Literal["chunkify.video.rendition_changed"]]
|
|
36
|
+
|
|
37
|
+
occurred_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
38
|
+
|
|
39
|
+
player_height_px: Required[Optional[float]]
|
|
40
|
+
|
|
41
|
+
player_name: Required[Optional[str]]
|
|
42
|
+
|
|
43
|
+
player_version: Required[Optional[str]]
|
|
44
|
+
|
|
45
|
+
player_width_px: Required[Optional[float]]
|
|
46
|
+
|
|
47
|
+
playhead_seconds: Required[Optional[float]]
|
|
48
|
+
|
|
49
|
+
previous_rendition_bitrate_bps: Required[Optional[float]]
|
|
50
|
+
|
|
51
|
+
previous_rendition_codec: Required[Optional[str]]
|
|
52
|
+
|
|
53
|
+
previous_rendition_frame_rate: Required[Optional[float]]
|
|
54
|
+
|
|
55
|
+
previous_rendition_height: Required[Optional[float]]
|
|
56
|
+
|
|
57
|
+
previous_rendition_width: Required[Optional[float]]
|
|
58
|
+
|
|
59
|
+
reason: Required[Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]]]
|
|
60
|
+
|
|
61
|
+
schema_version: Required[Literal[1]]
|
|
62
|
+
|
|
63
|
+
sdk_name: Required[str]
|
|
64
|
+
"""Name of the SDK or integration that produced the event.
|
|
65
|
+
|
|
66
|
+
Informational metadata, preserved as received. Must contain at least one
|
|
67
|
+
non-whitespace character.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
sdk_version: Required[str]
|
|
71
|
+
|
|
72
|
+
selected_rendition_bitrate_bps: Required[Optional[float]]
|
|
73
|
+
|
|
74
|
+
selected_rendition_codec: Required[Optional[str]]
|
|
75
|
+
|
|
76
|
+
selected_rendition_frame_rate: Required[Optional[float]]
|
|
77
|
+
|
|
78
|
+
selected_rendition_height: Required[Optional[float]]
|
|
79
|
+
|
|
80
|
+
selected_rendition_width: Required[Optional[float]]
|
|
81
|
+
|
|
82
|
+
sequence: Required[int]
|
|
83
|
+
|
|
84
|
+
startup_outcome: Required[Optional[Literal["started", "failed_before_start", "ended_before_start"]]]
|
|
85
|
+
|
|
86
|
+
video_id: Required[str]
|
|
87
|
+
|
|
88
|
+
view_id: Required[str]
|
|
89
|
+
|
|
90
|
+
viewer_id: Required[Optional[str]]
|
|
91
|
+
"""
|
|
92
|
+
Anonymous browser identifier generated by the Chunkify player SDK and stored in
|
|
93
|
+
the page's localStorage.
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
browser_context: Optional[BrowserContext]
|
|
97
|
+
"""Browser and device information.
|
|
98
|
+
|
|
99
|
+
The Chunkify player sends every field, with null for unavailable measurements.
|
|
100
|
+
Other integrations may omit any field except schema_version. Extra properties
|
|
101
|
+
are preserved.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
delivery_request_count: Optional[float]
|
|
105
|
+
|
|
106
|
+
delivery_throughput_bps: Optional[float]
|
|
107
|
+
|
|
108
|
+
delivery_transferred_bytes: Optional[float]
|
|
109
|
+
|
|
110
|
+
dropped_video_frames: Optional[float]
|
|
111
|
+
|
|
112
|
+
first_video_frame_time_ms: Optional[float]
|
|
113
|
+
|
|
114
|
+
furthest_progress_ratio: Optional[float]
|
|
115
|
+
|
|
116
|
+
maximum_playhead_seconds: float
|
|
117
|
+
|
|
118
|
+
media_duration_seconds: Optional[float]
|
|
119
|
+
|
|
120
|
+
media_height_px: Optional[float]
|
|
121
|
+
|
|
122
|
+
media_width_px: Optional[float]
|
|
123
|
+
|
|
124
|
+
playing_time_ms: float
|
|
125
|
+
|
|
126
|
+
rebuffer_count: float
|
|
127
|
+
|
|
128
|
+
rebuffer_duration_ms: float
|
|
129
|
+
|
|
130
|
+
rebuffer_ratio: Optional[float]
|
|
131
|
+
|
|
132
|
+
rendition_playing_time: Optional[Iterable[RenditionPlayingTime]]
|
|
133
|
+
|
|
134
|
+
rendition_switch_count: Optional[float]
|
|
135
|
+
|
|
136
|
+
seek_count: float
|
|
137
|
+
|
|
138
|
+
seek_duration_ms: float
|
|
139
|
+
|
|
140
|
+
startup_time_ms: Optional[float]
|
|
141
|
+
|
|
142
|
+
total_video_frames: Optional[float]
|
|
143
|
+
|
|
144
|
+
user_id: Optional[str]
|
|
145
|
+
"""
|
|
146
|
+
Optional integrator-supplied user ID, used to link views to the integrator's own
|
|
147
|
+
users.
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
video_title: Optional[str]
|
|
151
|
+
"""Optional human-readable video title for reports."""
|
|
152
|
+
|
|
153
|
+
visibility_state: Optional[Literal["visible", "hidden"]]
|
|
154
|
+
"""Tab visibility when the event was recorded.
|
|
155
|
+
|
|
156
|
+
Hidden does not imply paused playback or identify the cause of a pause. Missing
|
|
157
|
+
on older events; null when unavailable.
|
|
158
|
+
"""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["RenditionMetric"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RenditionMetric(BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
One rendition identified by its dimensions, codec, declared bitrate and frame rate.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
bitrate_bps: Optional[float] = None
|
|
16
|
+
"""Declared rendition bitrate in bits per second, not measured network throughput."""
|
|
17
|
+
|
|
18
|
+
codec: Optional[str] = None
|
|
19
|
+
"""Reported codec; null when unknown."""
|
|
20
|
+
|
|
21
|
+
frame_rate: Optional[float] = None
|
|
22
|
+
"""Reported frames per second; null when unknown."""
|
|
23
|
+
|
|
24
|
+
height: Optional[float] = None
|
|
25
|
+
"""Reported height in pixels; null when unknown."""
|
|
26
|
+
|
|
27
|
+
playing_time_ms: float
|
|
28
|
+
"""Cumulative measured playing time for this rendition, summed once per attempt."""
|
|
29
|
+
|
|
30
|
+
playing_time_ratio: float
|
|
31
|
+
"""
|
|
32
|
+
Share of all measured rendition playing time, including rows outside the
|
|
33
|
+
returned limit.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
views: int
|
|
37
|
+
"""Distinct attempts with positive playing time for this rendition."""
|
|
38
|
+
|
|
39
|
+
width: Optional[float] = None
|
|
40
|
+
"""Reported width in pixels; null when unknown."""
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .rendition_metric import RenditionMetric
|
|
7
|
+
|
|
8
|
+
__all__ = ["RenditionReport"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RenditionReport(BaseModel):
|
|
12
|
+
average_bitrate_bps: Optional[float] = None
|
|
13
|
+
"""Time-weighted mean declared bitrate.
|
|
14
|
+
|
|
15
|
+
Null without playing time with a known bitrate.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
bitrate_sample_playing_time_ms: float
|
|
19
|
+
"""
|
|
20
|
+
Measured playing time with a known rendition bitrate, used as the average
|
|
21
|
+
denominator.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
renditions: List[RenditionMetric]
|
|
25
|
+
"""Most-played renditions first.
|
|
26
|
+
|
|
27
|
+
Defaults to 100 rows, maximum 1000. CSV exports include all matching rows.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
sample_views: int
|
|
31
|
+
"""Attempts with positive measured rendition playing time."""
|
|
32
|
+
|
|
33
|
+
total_playing_time_ms: float
|
|
34
|
+
"""Total measured rendition playing time across all matching rows.
|
|
35
|
+
|
|
36
|
+
Can be less than overall watch time when rendition information is missing.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
total_renditions: int
|
|
40
|
+
"""Number of distinct renditions before applying the row limit."""
|
|
41
|
+
|
|
42
|
+
views: int
|
|
43
|
+
"""All attempts in the filtered start cohort."""
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["RenditionRetrieveParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RenditionRetrieveParams(TypedDict, total=False):
|
|
15
|
+
browser_name: str
|
|
16
|
+
"""Exact browser name, such as Chrome. Missing values do not match."""
|
|
17
|
+
|
|
18
|
+
city: str
|
|
19
|
+
"""
|
|
20
|
+
Exact, case-sensitive city name from the local lookup, with 1 to 256 Unicode
|
|
21
|
+
characters. Use country alongside city to distinguish places with the same name.
|
|
22
|
+
Missing locations do not match.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
continent: Literal["AF", "AN", "AS", "EU", "NA", "OC", "SA"]
|
|
26
|
+
"""Exact continent code from the local lookup. Missing locations do not match."""
|
|
27
|
+
|
|
28
|
+
country: str
|
|
29
|
+
"""Exact uppercase ISO 3166-1 alpha-2 country code, such as GB.
|
|
30
|
+
|
|
31
|
+
Missing locations do not match.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
device_type: Literal["desktop", "mobile", "tablet", "unknown"]
|
|
35
|
+
"""Exact device class. unknown matches an explicit unknown value."""
|
|
36
|
+
|
|
37
|
+
from_: Annotated[Union[str, datetime], PropertyInfo(alias="from", format="iso8601")]
|
|
38
|
+
"""Inclusive RFC3339 occurrence-time lower bound, with timezone.
|
|
39
|
+
|
|
40
|
+
Summary/video queries apply it to the selected view_started event. Must be
|
|
41
|
+
before to.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
limit: int
|
|
45
|
+
"""Maximum rows on this page.
|
|
46
|
+
|
|
47
|
+
Events and videos always support pagination; summary, quality and engagement
|
|
48
|
+
support it only with group_by.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
os_name: str
|
|
52
|
+
"""Exact operating-system name, such as macOS. Missing values do not match."""
|
|
53
|
+
|
|
54
|
+
page_origin: str
|
|
55
|
+
"""
|
|
56
|
+
Exact, case-sensitive page origin captured by the player, such as
|
|
57
|
+
https://example.com. Metrics use the first retained view start; raw events use
|
|
58
|
+
each event context. Missing values do not match.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
page_path: str
|
|
62
|
+
"""Exact, case-sensitive page path captured by the player, such as /watch/video.
|
|
63
|
+
|
|
64
|
+
Filter by page_origin as well to distinguish identical paths on different sites.
|
|
65
|
+
Metrics use the first retained view start; raw events use each event context.
|
|
66
|
+
Missing values do not match.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
playback_rate: str
|
|
70
|
+
"""
|
|
71
|
+
Playback rate from 0.01 to 16 with at most two decimals, such as 1, 1.5 or 2;
|
|
72
|
+
2.0 and 2 are the same rate. Metrics use the rate on the first retained view
|
|
73
|
+
start; raw events use each event's value.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
subtitle_language: str
|
|
77
|
+
"""
|
|
78
|
+
Exact, case-sensitive, non-blank subtitle language tag, such as fr or en-US; und
|
|
79
|
+
for a subtitles track without a language. Metrics use the language showing on
|
|
80
|
+
the first retained view start; raw events use each event's value. Views without
|
|
81
|
+
subtitles at start do not match.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
to: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
85
|
+
"""Exclusive RFC3339 occurrence-time upper bound, with timezone.
|
|
86
|
+
|
|
87
|
+
Summary/video queries apply it to the selected view_started event.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
user_id: str
|
|
91
|
+
"""Exact integrator-supplied user ID.
|
|
92
|
+
|
|
93
|
+
Selects views by their start event; event lists match each event's own value.
|
|
94
|
+
Missing/null user IDs do not match. Reports with this filter read one stored row
|
|
95
|
+
per view.
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
video_id: str
|
|
99
|
+
"""Exact video ID; must not be blank. Combined with all other filters using AND."""
|
|
100
|
+
|
|
101
|
+
video_title: str
|
|
102
|
+
"""Exact, case-sensitive video title.
|
|
103
|
+
|
|
104
|
+
Selects views by the title on their first retained start; event lists match each
|
|
105
|
+
event's own value. Views without a title do not match. Reports with this filter
|
|
106
|
+
read one stored row per view.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
view_id: str
|
|
110
|
+
"""Filter one playback attempt by view ID. Metrics use its first retained start."""
|
|
111
|
+
|
|
112
|
+
viewer_id: str
|
|
113
|
+
"""Exact viewer ID.
|
|
114
|
+
|
|
115
|
+
The Chunkify player SDK generates one per browser; missing/null viewer IDs do
|
|
116
|
+
not match.
|
|
117
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["RetentionBucket"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RetentionBucket(BaseModel):
|
|
9
|
+
end_seconds: float
|
|
10
|
+
"""Exclusive end of the section, capped at the reported duration."""
|
|
11
|
+
|
|
12
|
+
ratio: float
|
|
13
|
+
"""views divided by sample_views."""
|
|
14
|
+
|
|
15
|
+
start_seconds: float
|
|
16
|
+
"""Inclusive start of the video section."""
|
|
17
|
+
|
|
18
|
+
views: int
|
|
19
|
+
"""Distinct attempts that played any part of this section.
|
|
20
|
+
|
|
21
|
+
Each attempt counts at most once.
|
|
22
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .retention_bucket import RetentionBucket
|
|
7
|
+
|
|
8
|
+
__all__ = ["RetentionReport"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RetentionReport(BaseModel):
|
|
12
|
+
buckets: List[RetentionBucket]
|
|
13
|
+
|
|
14
|
+
duration_seconds: Optional[float] = None
|
|
15
|
+
"""Longest measured duration in this selection.
|
|
16
|
+
|
|
17
|
+
Null when there are no measured attempts.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
interval_seconds: Optional[float] = None
|
|
21
|
+
"""Bucket width, ceil(duration_seconds / 200), with a minimum of one second.
|
|
22
|
+
|
|
23
|
+
Null without measurements.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
sample_views: int
|
|
27
|
+
"""
|
|
28
|
+
Attempts whose selected final or latest snapshot contains played ranges and a
|
|
29
|
+
finite positive media duration. Includes measured empty ranges.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
views: int
|
|
33
|
+
"""All matching attempts with a retained start."""
|