From 4a8377704db13f8c58e542bb15b0ff5ac154645c Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Tue, 29 Mar 2022 05:10:49 +0300 Subject: [PATCH] comment: draft for future Platform type --- src/backend/platforms/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/backend/platforms/index.ts b/src/backend/platforms/index.ts index 321cbcd..29598f9 100644 --- a/src/backend/platforms/index.ts +++ b/src/backend/platforms/index.ts @@ -33,6 +33,21 @@ interface Platform { fetcher: PlatformFetcher; } +// draft for the future callback-based streaming/chunking API: +// interface FetchOptions { +// since?: string; // some kind of cursor, Date object or opaque string? +// save: (forecasts: Forecast[]) => Promise; +// } + +// export type PlatformFetcher = (options: FetchOptions) => Promise; + +// interface Platform { +// name: string; +// color?: string; +// longName: string; +// fetcher: PlatformFetcher; +// } + export const platforms: Platform[] = [ betfair, fantasyscotus,