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/getMatches/getPlayerMatches.tsx

34 lines
635 B

import { PROCEDURES, SportTypes } from 'config'
import type { MatchesBySection } from './types'
import { requestMatches } from './request'
const proc = PROCEDURES.get_player_matches
type Args = {
limit: number,
offset: number,
playerId: number,
sportType: SportTypes,
}
export const getPlayerMatches = async ({
limit,
offset,
playerId,
sportType,
}: Args): Promise<MatchesBySection> => {
const config = {
body: {
params: {
_p_limit: limit,
_p_offset: offset,
_p_player_id: playerId,
_p_sport: sportType,
},
proc,
},
}
return requestMatches(config)
}