Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(data): extended ad metrics #376

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 66 additions & 14 deletions src/resources/data/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query?: MetricGetInsightsParams,
options?: Core.RequestOptions,
): Core.APIPromise<InsightsResponse>;
Expand Down Expand Up @@ -123,7 +127,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
options?: Core.RequestOptions,
): Core.APIPromise<InsightsResponse>;
getInsights(
Expand Down Expand Up @@ -172,7 +180,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query: MetricGetInsightsParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<InsightsResponse> {
Expand Down Expand Up @@ -232,7 +244,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query?: MetricGetOverallValuesParams,
options?: Core.RequestOptions,
): Core.APIPromise<OverallValuesResponse>;
Expand Down Expand Up @@ -282,7 +298,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
options?: Core.RequestOptions,
): Core.APIPromise<OverallValuesResponse>;
getOverallValues(
Expand Down Expand Up @@ -331,7 +351,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query: MetricGetOverallValuesParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<OverallValuesResponse> {
Expand Down Expand Up @@ -398,7 +422,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query?: MetricGetTimeseriesParams,
options?: Core.RequestOptions,
): Core.APIPromise<MetricTimeseriesDataResponse>;
Expand Down Expand Up @@ -448,7 +476,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
options?: Core.RequestOptions,
): Core.APIPromise<MetricTimeseriesDataResponse>;
getTimeseries(
Expand Down Expand Up @@ -497,7 +529,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query: MetricGetTimeseriesParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<MetricTimeseriesDataResponse> {
Expand Down Expand Up @@ -556,7 +592,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query?: MetricListBreakdownValuesParams,
options?: Core.RequestOptions,
): Core.PagePromise<BreakdownValuesBasePage, BreakdownValue>;
Expand Down Expand Up @@ -606,7 +646,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
options?: Core.RequestOptions,
): Core.PagePromise<BreakdownValuesBasePage, BreakdownValue>;
listBreakdownValues(
Expand Down Expand Up @@ -655,7 +699,11 @@ export class Metrics extends APIResource {
| 'ad_startup_error_count'
| 'ad_startup_error_percentage'
| 'playback_business_exception_percentage'
| 'video_startup_business_exception_percentage',
| 'video_startup_business_exception_percentage'
| 'view_content_startup_time'
| 'ad_preroll_startup_time'
| 'ad_watch_time'
| 'view_content_watch_time',
query: MetricListBreakdownValuesParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<BreakdownValuesBasePage, BreakdownValue> {
Expand Down Expand Up @@ -880,7 +928,9 @@ export interface MetricListParams {
| 'viewer_device_manufacturer'
| 'viewer_device_model'
| 'viewer_device_name'
| 'viewer_user_id';
| 'viewer_user_id'
| 'ad_playback_failure'
| 'content_playback_failure';

/**
* Limit the results to rows that match conditions from provided key:value pairs.
Expand Down Expand Up @@ -1175,7 +1225,9 @@ export interface MetricListBreakdownValuesParams extends BasePageParams {
| 'viewer_device_manufacturer'
| 'viewer_device_model'
| 'viewer_device_name'
| 'viewer_user_id';
| 'viewer_user_id'
| 'ad_playback_failure'
| 'content_playback_failure';

/**
* Measurement for the provided metric. If omitted, the default for the metric will
Expand Down
16 changes: 13 additions & 3 deletions src/resources/data/video-views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,16 @@ export namespace VideoViewResponse {

ad_impression_count: number | null;

ad_playback_failure_error_type_id: number | null;

ad_preroll_startup_time: number | null;

ad_startup_error_count: number | null;

ad_startup_error_percentage: string | null;

ad_watch_time: number | null;

asn: number | null;

asn_name: string | null;
Expand Down Expand Up @@ -188,11 +194,11 @@ export namespace VideoViewResponse {

platform_summary: string | null;

playback_business_exception_error_type_id: number;
playback_business_exception_error_type_id: number | null;

playback_failure: boolean;

playback_failure_error_type_id: number;
playback_failure_error_type_id: number | null;

playback_id: string | null;

Expand Down Expand Up @@ -300,7 +306,7 @@ export namespace VideoViewResponse {

video_series: string | null;

video_startup_business_exception_error_type_id: number;
video_startup_business_exception_error_type_id: number | null;

video_startup_failure: boolean;

Expand All @@ -320,6 +326,10 @@ export namespace VideoViewResponse {

view_average_request_throughput: number | null;

view_content_startup_time: number | null;

view_content_watch_time: number | null;

view_drm_type: string | null;

view_dropped_frame_count: number | null;
Expand Down