Interface VideoReportOptions

interface VideoReportOptions {
    endDate?: string;
    incrementDays?: number;
    maxResults?: number;
    onError?: (err: Error | ScrollError) => void;
    onProgress?: (
        items: VideoReportEntry[],
        current: number,
        total?: number,
    ) => void;
    onScrollError?: (err: ScrollError) => void;
    signal?: AbortSignal;
    sortDirection?: SortDirection;
    startDate?: string;
    videoIds?: string | string[];
}

Hierarchy (View Summary)

Properties

endDate?: string
incrementDays?: number
maxResults?: number

maximum number of search results

onError?: (err: Error | ScrollError) => void

Search results use a scrollID cursor that expires after 1-5 minutes from first request. If the scrollID expires then onScrollExpired will be called with a ScrollError. Default behavior is to throw the error.

Note that request level errors (like 401 or 500) will just be thrown as normal, not passed to this function

onProgress?: (
    items: VideoReportEntry[],
    current: number,
    total?: number,
) => void

callback per page

onScrollError?: (err: ScrollError) => void

Use onError instead

use onError instead

signal?: AbortSignal
sortDirection?: SortDirection
startDate?: string
videoIds?: string | string[]