You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/requests/getLiveScores.tsx

29 lines
476 B

import { callApi } from 'helpers'
import { API_ROOT } from 'config'
type ScoreTeam = {
id: number,
penalty_score: number | null,
score: number | null,
}
export type LiveScore = {
match_id: number,
sport_id: number,
team1:ScoreTeam,
team2: ScoreTeam,
}
export const getLiveScores = (): Promise<Array<LiveScore>> => {
const url = `${API_ROOT}/v1/matches/live/scores`
const config = {
method: 'GET',
}
return callApi({
config,
url,
})
}