blob: e0f916990c35770d84bb2e879e28c75b60a89160 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import { VideoImportCreate } from '../../../../shared/models/videos'
import { makeGetRequest, makePostBodyRequest } from '..'
function getYoutubeVideoUrl () {
return 'https://youtu.be/msX3jv1XdvM'
}
function importVideo (url: string, token: string, attributes: VideoImportCreate) {
const path = '/api/v1/videos/imports'
return makePostBodyRequest({
url,
path,
token,
fields: attributes,
statusCodeExpected: 200
})
}
function getMyVideoImports (url: string, token: string) {
const path = '/api/v1/users/me/videos/imports'
return makeGetRequest({
url,
path,
token,
statusCodeExpected: 200
})
}
// ---------------------------------------------------------------------------
export {
getYoutubeVideoUrl,
importVideo,
getMyVideoImports
}
|