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.
31 lines
529 B
31 lines
529 B
import { API_ROOT, SportTypes } from 'config'
|
|
import { callApi } from 'helpers'
|
|
|
|
type Video = {
|
|
/** id дорожки */
|
|
abc: number,
|
|
duration: number,
|
|
period: number,
|
|
quality: string,
|
|
start_ms: number,
|
|
url: string,
|
|
}
|
|
|
|
export type Videos = Array<Video>
|
|
|
|
export const getVideos = (
|
|
sportType: SportTypes,
|
|
matchId: number,
|
|
): Promise<Videos> => {
|
|
const config = {
|
|
body: {
|
|
match_id: matchId,
|
|
sport_id: sportType,
|
|
},
|
|
}
|
|
|
|
return callApi({
|
|
config,
|
|
url: `${API_ROOT}/videoapi`,
|
|
})
|
|
}
|
|
|