mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fetchimg video infos
This commit is contained in:
parent
1056f0ff72
commit
c74ab01927
9 changed files with 60 additions and 13 deletions
11
src/redux/player/api.ts
Normal file
11
src/redux/player/api.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { IResultWithStatus, IEmbed } from '../types';
|
||||
import { api, resultMiddleware, errorMiddleware } from '~/utils/api';
|
||||
import { API } from '~/constants/api';
|
||||
|
||||
export const getEmbedYoutube = (
|
||||
ids: string[]
|
||||
): Promise<IResultWithStatus<{ items: Record<string, IEmbed> }>> =>
|
||||
api
|
||||
.get(API.EMBED.YOUTUBE, { params: { ids: ids.join(',') } })
|
||||
.then(resultMiddleware)
|
||||
.catch(errorMiddleware);
|
Loading…
Add table
Add a link
Reference in a new issue