UNPKG

@niur/google-admanager-api

Version:
30 lines 906 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AdsReportUtilities = void 0; class AdsReportUtilities { constructor() { this.WAIT_PERIOD = 30 * 1000; } /** * Returns a flag indicating whether the caller should wait more time for * the report download to complete. * @returns True, if the caller should wait more, false otherwise. */ async shouldWaitMore() { return false; } schedule() { } /** * Gets the report download response. * @returns The report response. */ async getResponse() { this.schedule(); while (await this.shouldWaitMore()) { new Promise((resolve) => setTimeout(resolve, this.WAIT_PERIOD)); } return this.getReport(); } } exports.AdsReportUtilities = AdsReportUtilities; //# sourceMappingURL=adsReportUtilities.util.js.map