})
}
+function getPlaylistVideos (
+ url: string,
+ accessToken: string,
+ playlistId: number | string,
+ start: number,
+ count: number,
+ query: { nsfw?: boolean } = {}
+) {
+ const path = '/api/v1/video-playlists/' + playlistId + '/videos'
+
+ return makeGetRequest({
+ url,
+ path,
+ query: immutableAssign(query, {
+ start,
+ count
+ }),
+ token: accessToken,
+ statusCodeExpected: 200
+ })
+}
+
function getVideosListPagination (url: string, start: number, count: number, sort?: string) {
const path = '/api/v1/videos'
if (attributes.licence !== undefined) {
req.field('licence', attributes.licence.toString())
}
- if (attributes.originallyPublishedAt !== undefined) {
- req.field('originallyPublishedAt', attributes.originallyPublishedAt)
- }
for (let i = 0; i < attributes.tags.length; i++) {
req.field('tags[' + i + ']', attributes.tags[i])
}
}
+ if (attributes.originallyPublishedAt !== undefined) {
+ req.field('originallyPublishedAt', attributes.originallyPublishedAt)
+ }
+
return req.attach('videofile', buildAbsoluteFixturePath(attributes.fixture))
.expect(specialStatus)
}
parseTorrentVideo,
getLocalVideos,
completeVideoCheck,
- checkVideoFilesWereRemoved
+ checkVideoFilesWereRemoved,
+ getPlaylistVideos
}