import * as request from 'supertest'
import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared/models/videos'
+import { updateAvatarRequest } from '../index'
function getVideoChannelsList (url: string, start: number, count: number, sort?: string) {
const path = '/api/v1/video-channels'
.expect('Content-Type', /json/)
}
-function getAccountVideoChannelsList (url: string, accountId: number | string, specialStatus = 200) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels'
+function getAccountVideoChannelsList (url: string, accountName: string, specialStatus = 200) {
+ const path = '/api/v1/accounts/' + accountName + '/video-channels'
return request(url)
.get(path)
.expect('Content-Type', /json/)
}
+function updateVideoChannelAvatar (options: {
+ url: string,
+ accessToken: string,
+ fixture: string,
+ videoChannelId: string | number
+}) {
+
+ const path = '/api/v1/video-channels/' + options.videoChannelId + '/avatar/pick'
+
+ return updateAvatarRequest(Object.assign(options, { path }))
+}
+
// ---------------------------------------------------------------------------
export {
+ updateVideoChannelAvatar,
getVideoChannelsList,
getAccountVideoChannelsList,
addVideoChannel,