investing-economic-calendar
Version:
Extract economic events from the Investing.com widget.
25 lines (24 loc) • 904 B
TypeScript
import type { CalendarType } from "./models/CalendarType";
import type { Country } from "./models/Country";
import { type Currency } from "./models/Currency";
import type { EconomicEvent } from "./models/EconomicEvent";
import { Importance } from "./models/Importance";
import type { Language } from "./models/Language";
import type { TimeZone } from "./models/TimeZone";
interface InvestingParams {
importance: Importance[];
countries?: Country[];
calType: CalendarType.DAILY | CalendarType.WEEKLY;
timeZone: TimeZone;
lang: Language;
}
export interface Params extends InvestingParams {
currencies?: Currency[];
}
/**
* Extract events from the widget
* @param {Params} params - Parameters to send to the widget
* @returns {EconomicEvent[]} - Array with all events extracted
*/
export declare function fetchEconomicEvents(params: Params): Promise<EconomicEvent[]>;
export {};