const videosUtils = {
getVideoCategories,
+ getVideoLicences,
getAllVideosListBy,
getVideo,
getVideosList,
.end(end)
}
+function getVideoLicences (url, end) {
+ const path = '/api/v1/videos/licences'
+
+ request(url)
+ .get(path)
+ .set('Accept', 'application/json')
+ .expect(200)
+ .expect('Content-Type', /json/)
+ .end(end)
+}
+
function getAllVideosListBy (url, end) {
const path = '/api/v1/videos'
let attributes = {
name: 'my super video',
category: 5,
+ licence: 4,
description: 'my super description',
tags: [ 'tag' ],
fixture: 'video_short.webm'
.set('Authorization', 'Bearer ' + accessToken)
.field('name', attributes.name)
.field('category', attributes.category)
+ .field('licence', attributes.licence)
.field('description', attributes.description)
for (let i = 0; i < attributes.tags.length; i++) {
if (attributes.name) req.field('name', attributes.name)
if (attributes.category) req.field('category', attributes.category)
+ if (attributes.licence) req.field('licence', attributes.licence)
if (attributes.description) req.field('description', attributes.description)
if (attributes.tags) {