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

30 lines
547 B

import { API_ROOT, SportTypes } from 'config'
import { callApi } from 'helpers'
type Match = {
match_id: number,
sport_id: SportTypes,
}
export type PreviewsData = Array<Match>
type Preview = {
match_id: number,
preview: string,
sport_id: SportTypes,
}
export type Previews = Array<Preview>
export const getMatchesPreviewImages = async (matches: PreviewsData) => {
const config = {
body: matches,
}
const previews: Previews = await callApi({
config,
url: `${API_ROOT}/videoapi/preview`,
})
return previews
}