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/getSportTeams.tsx

52 lines
855 B

import {
DATA_URL,
PROCEDURES,
} from 'config'
import { callApi } from 'helpers'
const proc = PROCEDURES.get_sport_teams
export type Team = {
c_country?: number,
c_gender?: number,
c_sport?: number,
c_team_type?: number,
country_en?: string,
country_iso?: string,
country_ru?: string,
dl?: boolean,
id: number,
name_eng: string,
name_national: string,
name_rus: string,
short_name_eng?: string,
short_name_rus?: string,
ts: string,
}
export type SportTeamsType = {
data: Array<Team>,
more: boolean,
}
export const getSportTeams = (
sport_id: number,
_p_limit: number,
_p_name: string,
)
: Promise<SportTeamsType> => {
const config = {
body: {
params: {
_p_limit,
_p_name,
sport_id,
},
proc,
},
}
return callApi({
config,
url: DATA_URL,
})
}