Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FrequencyCap

import type { FrequencyCap } from "https://googleapis.deno.dev/v1/displayvideo:v3.ts";

Settings that control the number of times a user may be shown with the same ad during a given time period.

interface FrequencyCap {
maxImpressions?: number;
maxViews?: number;
timeUnit?:
| "TIME_UNIT_UNSPECIFIED"
| "TIME_UNIT_LIFETIME"
| "TIME_UNIT_MONTHS"
| "TIME_UNIT_WEEKS"
| "TIME_UNIT_DAYS"
| "TIME_UNIT_HOURS"
| "TIME_UNIT_MINUTES";
timeUnitCount?: number;
unlimited?: boolean;
}

§Properties

§
maxImpressions?: number
[src]

The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is false and max_views is not set.

§
maxViews?: number
[src]

Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is false and max_impressions is not set.

§
timeUnit?: "TIME_UNIT_UNSPECIFIED" | "TIME_UNIT_LIFETIME" | "TIME_UNIT_MONTHS" | "TIME_UNIT_WEEKS" | "TIME_UNIT_DAYS" | "TIME_UNIT_HOURS" | "TIME_UNIT_MINUTES"
[src]

The time unit in which the frequency cap will be applied. Required when unlimited is false.

§
timeUnitCount?: number
[src]

The number of time_unit the frequency cap will last. Required when unlimited is false. The following restrictions apply based on the value of time_unit: * TIME_UNIT_LIFETIME - this field is output only and will default to 1 * TIME_UNIT_MONTHS - must be between 1 and 2 * TIME_UNIT_WEEKS - must be between 1 and 4 * TIME_UNIT_DAYS - must be between 1 and 6 * TIME_UNIT_HOURS - must be between 1 and 23 * TIME_UNIT_MINUTES - must be between 1 and 59

§
unlimited?: boolean
[src]

Whether unlimited frequency capping is applied. When this field is set to true, the remaining frequency cap fields are not applicable.