import { Request } from '../util'; import { ItemTypes, ItemReturns, PaginatedResponse, PaginatedItemOptions, PaginatedType, Resolvable, PaginatedInstance, PaginatedRequestParams, AuthorizationOptions } from '../types'; import YouTube from '..'; /** * @ignore */ export declare class RetrievalService { #private; private youtube; readonly _getItemAllowedTypes: Set; readonly _getMineAllowed: Set; constructor(youtube: YouTube, request: Request); getItem | Resolvable[], K extends ItemTypes, M extends boolean = false>(type: K, { mine, resolvableEntity }: { mine?: M; resolvableEntity?: T; }, parts?: string[]): Promise>; /** * * @param maxPerPage Leave undefined or set to < 1 to fetch the maximum * allowed by the API for any given type. * @param pages Number of pages to fetch from the API. * Set to < 1 to fetch all of them. Defaults to 1. * @param pageToken The page to start at * (retrieved from the return value of a previous call to this function) * * @returns An object containing the array of instantiated entities as well * as possible next and previous page tokens. */ getPaginatedItems({ type, mine, id, maxPerPage, pages, pageToken, subId, parts, ...otherFilters }: PaginatedItemOptions, auth?: AuthorizationOptions): Promise>; /** * Caching handled here * @param clazz Most endpoints only return one type of entity, so set this to that entity. * If endpoint is `search`, then leave undefined. */ getPages(pages: number, endpoint: string, options: PaginatedRequestParams, clazz?: T, auth?: AuthorizationOptions, parts?: string[]): Promise>>; private transformItemToCachedEntity; }