UNPKG

brasileirao

Version:

<p align="center"> <a href="https://github.com/godrix/brasileirao/actions"> <img src="https://img.shields.io/github/actions/workflow/status/godrix/brasileirao/publish.yml"/> </a> <a href="https://github.com/godrix/brasileirao"> <img src="htt

17 lines (14 loc) 470 B
import { LeagueTable, LeagueTableResultRequest, ProvidersSupported } from '../../models' import { BASE_URL } from '../../../constants' import request from '../../../services/request' export async function TableService (provider:ProvidersSupported ,liga: LeagueTable): Promise<LeagueTableResultRequest> { try { const data = await request.get(BASE_URL.TABLE[provider][liga]) return { data, provider } } catch (error) { throw error } }