Skip to content

Commit

Permalink
feat(data): extended ad metrics (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 15, 2024
1 parent 16c211f commit 580b37e
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 17 deletions.
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

0 comments on commit 580b37e

Please sign in to comment.