import { PROCEDURES, API_ROOT } from 'config' import { client } from 'config/clients' import type { MatchesBySection } from './types' import { requestMatches } from './request' const proc = PROCEDURES.get_matches type Args = { date: string, date_to?: string, limit: number, offset: number, timezoneOffset: number, } export const getHomeMatches = async ({ date, date_to, limit, offset, timezoneOffset, }: Args): Promise => { const url = `${API_ROOT}/v2/data/matches/query` const config = { body: { date: `${date} 00:00:00`, date_to, gmt: timezoneOffset, limit, offset, ...client.requests?.[proc], }, } return requestMatches(config, url) }