Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Update video-channel routes (again)

Chocobozzzcc918ac3f45e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac3f61735e..4a327737d9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,7 @@
* Hide by default NSFW videos. Update the `instance.default_nsfw_policy` configuration to `blur` to keep the old behaviour
* Move video channels routes:
- * `/videos/channels` routes to `/accounts/{accountId}/video-channels`
+ * `/videos/channels` routes to `/video-channels`
* `/videos/accounts/{accountId}/channels` route to `/accounts/{accountId}/video-channels`
* PeerTube now listen on 127.0.0.1 by default
* Use ISO 639 for language (*en*, *es*, *fr*...)
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 85987c912f..ccae0436b1 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -1,30 +1,18 @@
import * as express from 'express'
-import { getFormattedObjects, resetSequelizeInstance } from '../../helpers/utils'
+import { getFormattedObjects } from '../../helpers/utils'
import {
asyncMiddleware,
- authenticate,
listVideoAccountChannelsValidator,
optionalAuthenticate,
paginationValidator,
setDefaultPagination,
- setDefaultSort,
- videoChannelsAddValidator,
- videoChannelsGetValidator,
- videoChannelsRemoveValidator,
- videoChannelsUpdateValidator
+ setDefaultSort
} from '../../middlewares'
import { accountsGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
import { AccountModel } from '../../models/account/account'
import { VideoModel } from '../../models/video/video'
import { isNSFWHidden } from '../../helpers/express-utils'
import { VideoChannelModel } from '../../models/video/video-channel'
-import { VideoChannelCreate, VideoChannelUpdate } from '../../../shared'
-import { sendUpdateActor } from '../../lib/activitypub/send'
-import { createVideoChannel } from '../../lib/video-channel'
-import { setAsyncActorKeys } from '../../lib/activitypub'
-import { sequelizeTypescript } from '../../initializers'
-import { logger } from '../../helpers/logger'
-import { retryTransactionWrapper } from '../../helpers/database-utils'
const accountsRouter = express.Router()
@@ -56,39 +44,6 @@ accountsRouter.get('/:accountId/video-channels',
asyncMiddleware(listVideoAccountChannels)
)
-accountsRouter.post('/:accountId/video-channels',
- authenticate,
- videoChannelsAddValidator,
- asyncMiddleware(addVideoChannelRetryWrapper)
-)
-
-accountsRouter.put('/:accountId/video-channels/:id',
- authenticate,
- asyncMiddleware(videoChannelsUpdateValidator),
- updateVideoChannelRetryWrapper
-)
-
-accountsRouter.delete('/:accountId/video-channels/:id',
- authenticate,
- asyncMiddleware(videoChannelsRemoveValidator),
- asyncMiddleware(removeVideoChannelRetryWrapper)
-)
-
-accountsRouter.get('/:accountId/video-channels/:id',
- asyncMiddleware(videoChannelsGetValidator),
- asyncMiddleware(getVideoChannel)
-)
-
-accountsRouter.get('/:accountId/video-channels/:id/videos',
- asyncMiddleware(videoChannelsGetValidator),
- paginationValidator,
- videosSortValidator,
- setDefaultSort,
- setDefaultPagination,
- optionalAuthenticate,
- asyncMiddleware(listVideoChannelVideos)
-)
-
// ---------------------------------------------------------------------------
export {
@@ -115,125 +70,6 @@ async function listVideoAccountChannels (req: express.Request, res: express.Resp
return res.json(getFormattedObjects(resultList.data, resultList.total))
}
-// Wrapper to video channel add that retry the async function if there is a database error
-// We need this because we run the transaction in SERIALIZABLE isolation that can fail
-async function addVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
- const options = {
- arguments: [ req, res ],
- errorMessage: 'Cannot insert the video video channel with many retries.'
- }
-
- const videoChannel = await retryTransactionWrapper(addVideoChannel, options)
- return res.json({
- videoChannel: {
- id: videoChannel.id,
- uuid: videoChannel.Actor.uuid
- }
- }).end()
-}
-
-async function addVideoChannel (req: express.Request, res: express.Response) {
- const videoChannelInfo: VideoChannelCreate = req.body
- const account: AccountModel = res.locals.oauth.token.User.Account
-
- const videoChannelCreated: VideoChannelModel = await sequelizeTypescript.transaction(async t => {
- return createVideoChannel(videoChannelInfo, account, t)
- })
-
- setAsyncActorKeys(videoChannelCreated.Actor)
- .catch(err => logger.error('Cannot set async actor keys for account %s.', videoChannelCreated.Actor.uuid, { err }))
-
- logger.info('Video channel with uuid %s created.', videoChannelCreated.Actor.uuid)
-
- return videoChannelCreated
-}
-
-async function updateVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
- const options = {
- arguments: [ req, res ],
- errorMessage: 'Cannot update the video with many retries.'
- }
-
- await retryTransactionWrapper(updateVideoChannel, options)
-
- return res.type('json').status(204).end()
-}
-
-async function updateVideoChannel (req: express.Request, res: express.Response) {
- const videoChannelInstance = res.locals.videoChannel as VideoChannelModel
- const videoChannelFieldsSave = videoChannelInstance.toJSON()
- const videoChannelInfoToUpdate = req.body as VideoChannelUpdate
-
- try {
- await sequelizeTypescript.transaction(async t => {
- const sequelizeOptions = {
- transaction: t
- }
-
- if (videoChannelInfoToUpdate.name !== undefined) videoChannelInstance.set('name', videoChannelInfoToUpdate.name)
- if (videoChannelInfoToUpdate.description !== undefined) videoChannelInstance.set('description', videoChannelInfoToUpdate.description)
- if (videoChannelInfoToUpdate.support !== undefined) videoChannelInstance.set('support', videoChannelInfoToUpdate.support)
-
- const videoChannelInstanceUpdated = await videoChannelInstance.save(sequelizeOptions)
- await sendUpdateActor(videoChannelInstanceUpdated, t)
- })
-
- logger.info('Video channel with name %s and uuid %s updated.', videoChannelInstance.name, videoChannelInstance.Actor.uuid)
- } catch (err) {
- logger.debug('Cannot update the video channel.', { err })
-
- // Force fields we want to update
- // If the transaction is retried, sequelize will think the object has not changed
- // So it will skip the SQL request, even if the last one was ROLLBACKed!
- resetSequelizeInstance(videoChannelInstance, videoChannelFieldsSave)
-
- throw err
- }
-}
-
-async function removeVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
- const options = {
- arguments: [ req, res ],
- errorMessage: 'Cannot remove the video channel with many retries.'
- }
-
- await retryTransactionWrapper(removeVideoChannel, options)
-
- return res.type('json').status(204).end()
-}
-
-async function removeVideoChannel (req: express.Request, res: express.Response) {
- const videoChannelInstance: VideoChannelModel = res.locals.videoChannel
-
- return sequelizeTypescript.transaction(async t => {
- await videoChannelInstance.destroy({ transaction: t })
-
- logger.info('Video channel with name %s and uuid %s deleted.', videoChannelInstance.name, videoChannelInstance.Actor.uuid)
- })
-
-}
-
-async function getVideoChannel (req: express.Request, res: express.Response, next: express.NextFunction) {
- const videoChannelWithVideos = await VideoChannelModel.loadAndPopulateAccountAndVideos(res.locals.videoChannel.id)
-
- return res.json(videoChannelWithVideos.toFormattedJSON())
-}
-
-async function listVideoChannelVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
- const videoChannelInstance: VideoChannelModel = res.locals.videoChannel
-
- const resultList = await VideoModel.listForApi({
- start: req.query.start,
- count: req.query.count,
- sort: req.query.sort,
- hideNSFW: isNSFWHidden(res),
- withFiles: false,
- videoChannelId: videoChannelInstance.id
- })
-
- return res.json(getFormattedObjects(resultList.data, resultList.total))
-}
-
async function listAccountVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
const account: AccountModel = res.locals.account
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts
index d572737471..6241aaa5cb 100644
--- a/server/controllers/api/video-channel.ts
+++ b/server/controllers/api/video-channel.ts
@@ -1,13 +1,30 @@
import * as express from 'express'
-import { getFormattedObjects } from '../../helpers/utils'
+import { getFormattedObjects, resetSequelizeInstance } from '../../helpers/utils'
import {
asyncMiddleware,
+ authenticate,
+ optionalAuthenticate,
paginationValidator,
setDefaultPagination,
setDefaultSort,
- videoChannelsSortValidator
+ videoChannelsAddValidator,
+ videoChannelsGetValidator,
+ videoChannelsRemoveValidator,
+ videoChannelsSortValidator,
+ videoChannelsUpdateValidator
} from '../../middlewares'
import { VideoChannelModel } from '../../models/video/video-channel'
+import { videosSortValidator } from '../../middlewares/validators'
+import { sendUpdateActor } from '../../lib/activitypub/send'
+import { VideoChannelCreate, VideoChannelUpdate } from '../../../shared'
+import { createVideoChannel } from '../../lib/video-channel'
+import { isNSFWHidden } from '../../helpers/express-utils'
+import { setAsyncActorKeys } from '../../lib/activitypub'
+import { retryTransactionWrapper } from '../../helpers/database-utils'
+import { AccountModel } from '../../models/account/account'
+import { sequelizeTypescript } from '../../initializers'
+import { logger } from '../../helpers/logger'
+import { VideoModel } from '../../models/video/video'
const videoChannelRouter = express.Router()
@@ -19,6 +36,39 @@ videoChannelRouter.get('/',
asyncMiddleware(listVideoChannels)
)
+videoChannelRouter.post('/',
+ authenticate,
+ videoChannelsAddValidator,
+ asyncMiddleware(addVideoChannelRetryWrapper)
+)
+
+videoChannelRouter.put('/:id',
+ authenticate,
+ asyncMiddleware(videoChannelsUpdateValidator),
+ updateVideoChannelRetryWrapper
+)
+
+videoChannelRouter.delete('/:id',
+ authenticate,
+ asyncMiddleware(videoChannelsRemoveValidator),
+ asyncMiddleware(removeVideoChannelRetryWrapper)
+)
+
+videoChannelRouter.get('/:id',
+ asyncMiddleware(videoChannelsGetValidator),
+ asyncMiddleware(getVideoChannel)
+)
+
+videoChannelRouter.get('/:id/videos',
+ asyncMiddleware(videoChannelsGetValidator),
+ paginationValidator,
+ videosSortValidator,
+ setDefaultSort,
+ setDefaultPagination,
+ optionalAuthenticate,
+ asyncMiddleware(listVideoChannelVideos)
+)
+
// ---------------------------------------------------------------------------
export {
@@ -32,3 +82,122 @@ async function listVideoChannels (req: express.Request, res: express.Response, n
return res.json(getFormattedObjects(resultList.data, resultList.total))
}
+
+// Wrapper to video channel add that retry the async function if there is a database error
+// We need this because we run the transaction in SERIALIZABLE isolation that can fail
+async function addVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const options = {
+ arguments: [ req, res ],
+ errorMessage: 'Cannot insert the video video channel with many retries.'
+ }
+
+ const videoChannel = await retryTransactionWrapper(addVideoChannel, options)
+ return res.json({
+ videoChannel: {
+ id: videoChannel.id,
+ uuid: videoChannel.Actor.uuid
+ }
+ }).end()
+}
+
+async function addVideoChannel (req: express.Request, res: express.Response) {
+ const videoChannelInfo: VideoChannelCreate = req.body
+ const account: AccountModel = res.locals.oauth.token.User.Account
+
+ const videoChannelCreated: VideoChannelModel = await sequelizeTypescript.transaction(async t => {
+ return createVideoChannel(videoChannelInfo, account, t)
+ })
+
+ setAsyncActorKeys(videoChannelCreated.Actor)
+ .catch(err => logger.error('Cannot set async actor keys for account %s.', videoChannelCreated.Actor.uuid, { err }))
+
+ logger.info('Video channel with uuid %s created.', videoChannelCreated.Actor.uuid)
+
+ return videoChannelCreated
+}
+
+async function updateVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const options = {
+ arguments: [ req, res ],
+ errorMessage: 'Cannot update the video with many retries.'
+ }
+
+ await retryTransactionWrapper(updateVideoChannel, options)
+
+ return res.type('json').status(204).end()
+}
+
+async function updateVideoChannel (req: express.Request, res: express.Response) {
+ const videoChannelInstance = res.locals.videoChannel as VideoChannelModel
+ const videoChannelFieldsSave = videoChannelInstance.toJSON()
+ const videoChannelInfoToUpdate = req.body as VideoChannelUpdate
+
+ try {
+ await sequelizeTypescript.transaction(async t => {
+ const sequelizeOptions = {
+ transaction: t
+ }
+
+ if (videoChannelInfoToUpdate.name !== undefined) videoChannelInstance.set('name', videoChannelInfoToUpdate.name)
+ if (videoChannelInfoToUpdate.description !== undefined) videoChannelInstance.set('description', videoChannelInfoToUpdate.description)
+ if (videoChannelInfoToUpdate.support !== undefined) videoChannelInstance.set('support', videoChannelInfoToUpdate.support)
+
+ const videoChannelInstanceUpdated = await videoChannelInstance.save(sequelizeOptions)
+ await sendUpdateActor(videoChannelInstanceUpdated, t)
+ })
+
+ logger.info('Video channel with name %s and uuid %s updated.', videoChannelInstance.name, videoChannelInstance.Actor.uuid)
+ } catch (err) {
+ logger.debug('Cannot update the video channel.', { err })
+
+ // Force fields we want to update
+ // If the transaction is retried, sequelize will think the object has not changed
+ // So it will skip the SQL request, even if the last one was ROLLBACKed!
+ resetSequelizeInstance(videoChannelInstance, videoChannelFieldsSave)
+
+ throw err
+ }
+}
+
+async function removeVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const options = {
+ arguments: [ req, res ],
+ errorMessage: 'Cannot remove the video channel with many retries.'
+ }
+
+ await retryTransactionWrapper(removeVideoChannel, options)
+
+ return res.type('json').status(204).end()
+}
+
+async function removeVideoChannel (req: express.Request, res: express.Response) {
+ const videoChannelInstance: VideoChannelModel = res.locals.videoChannel
+
+ return sequelizeTypescript.transaction(async t => {
+ await videoChannelInstance.destroy({ transaction: t })
+
+ logger.info('Video channel with name %s and uuid %s deleted.', videoChannelInstance.name, videoChannelInstance.Actor.uuid)
+ })
+
+}
+
+async function getVideoChannel (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const videoChannelWithVideos = await VideoChannelModel.loadAndPopulateAccountAndVideos(res.locals.videoChannel.id)
+
+ return res.json(videoChannelWithVideos.toFormattedJSON())
+}
+
+async function listVideoChannelVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const videoChannelInstance: VideoChannelModel = res.locals.videoChannel
+
+ const resultList = await VideoModel.listForApi({
+ start: req.query.start,
+ count: req.query.count,
+ sort: req.query.sort,
+ hideNSFW: isNSFWHidden(res),
+ withFiles: false,
+ videoChannelId: videoChannelInstance.id
+ })
+
+ return res.json(getFormattedObjects(resultList.data, resultList.total))
+}
diff --git a/server/middlewares/validators/video-channels.ts b/server/middlewares/validators/video-channels.ts
index 9e6f459cfa..a70f196df4 100644
--- a/server/middlewares/validators/video-channels.ts
+++ b/server/middlewares/validators/video-channels.ts
@@ -27,7 +27,6 @@ const listVideoAccountChannelsValidator = [
]
const videoChannelsAddValidator = [
- param('accountId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid account id'),
body('name').custom(isVideoChannelNameValid).withMessage('Should have a valid name'),
body('description').optional().custom(isVideoChannelDescriptionValid).withMessage('Should have a valid description'),
body('support').optional().custom(isVideoChannelSupportValid).withMessage('Should have a valid support text'),
@@ -43,7 +42,6 @@ const videoChannelsAddValidator = [
const videoChannelsUpdateValidator = [
param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'),
- param('accountId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid account id'),
body('name').optional().custom(isVideoChannelNameValid).withMessage('Should have a valid name'),
body('description').optional().custom(isVideoChannelDescriptionValid).withMessage('Should have a valid description'),
body('support').optional().custom(isVideoChannelSupportValid).withMessage('Should have a valid support text'),
@@ -52,9 +50,7 @@ const videoChannelsUpdateValidator = [
logger.debug('Checking videoChannelsUpdate parameters', { parameters: req.body })
if (areValidationErrors(req, res)) return
- if (!await isAccountIdExist(req.params.accountId, res)) return
if (!await isVideoChannelExist(req.params.id, res)) return
- if (!checkAccountOwnsVideoChannel(res.locals.account, res.locals.videoChannel, res)) return
// We need to make additional checks
if (res.locals.videoChannel.Actor.isOwned() === false) {
@@ -75,17 +71,13 @@ const videoChannelsUpdateValidator = [
const videoChannelsRemoveValidator = [
param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'),
- param('accountId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid account id'),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking videoChannelsRemove parameters', { parameters: req.params })
if (areValidationErrors(req, res)) return
- if (!await isAccountIdExist(req.params.accountId, res)) return
if (!await isVideoChannelExist(req.params.id, res)) return
- if (!checkAccountOwnsVideoChannel(res.locals.account, res.locals.videoChannel, res)) return
- // Check if the user who did the request is able to delete the video
if (!checkUserCanDeleteVideoChannel(res.locals.oauth.token.User, res.locals.videoChannel, res)) return
if (!await checkVideoChannelIsNotTheLastOne(res)) return
@@ -95,19 +87,14 @@ const videoChannelsRemoveValidator = [
const videoChannelsGetValidator = [
param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'),
- param('accountId').optional().custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid account id'),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking videoChannelsGet parameters', { parameters: req.params })
if (areValidationErrors(req, res)) return
- // On some routes, accountId is optional (for example in the ActivityPub route)
- if (req.params.accountId && !await isAccountIdExist(req.params.accountId, res)) return
if (!await isVideoChannelExist(req.params.id, res)) return
- if (res.locals.account && !checkAccountOwnsVideoChannel(res.locals.account, res.locals.videoChannel, res)) return
-
return next()
}
]
@@ -160,15 +147,3 @@ async function checkVideoChannelIsNotTheLastOne (res: express.Response) {
return true
}
-
-function checkAccountOwnsVideoChannel (account: AccountModel, videoChannel: VideoChannelModel, res: express.Response) {
- if (videoChannel.Account.id !== account.id) {
- res.status(400)
- .json({ error: 'This account does not own this video channel' })
- .end()
-
- return false
- }
-
- return true
-}
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index 25b2dc9b95..7cda879ed9 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -27,10 +27,8 @@ const expect = chai.expect
describe('Test videos API validator', function () {
const videoChannelPath = '/api/v1/video-channels'
- const accountPath = '/api/v1/accounts/'
let server: ServerInfo
let accessTokenUser: string
- let accountUUID: string
let videoChannelUUID: string
// ---------------------------------------------------------------
@@ -57,7 +55,6 @@ describe('Test videos API validator', function () {
{
const res = await getMyUserInformation(server.url, server.accessToken)
const user: User = res.body
- accountUUID = user.account.uuid
videoChannelUUID = user.videoChannels[0].uuid
}
})
@@ -92,45 +89,46 @@ describe('Test videos API validator', function () {
description: 'super description',
support: 'super support text'
}
- let path: string
-
- before(async function () {
- path = accountPath + accountUUID + '/video-channels'
- })
it('Should fail with a non authenticated user', async function () {
- await makePostBodyRequest({ url: server.url, path, token: 'none', fields: baseCorrectParams, statusCodeExpected: 401 })
+ await makePostBodyRequest({
+ url: server.url,
+ path: videoChannelPath,
+ token: 'none',
+ fields: baseCorrectParams,
+ statusCodeExpected: 401
+ })
})
it('Should fail with nothing', async function () {
const fields = {}
- await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
+ await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should fail without name', async function () {
const fields = omit(baseCorrectParams, 'name')
- await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
+ await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should fail with a long name', async function () {
const fields = immutableAssign(baseCorrectParams, { name: 'super'.repeat(25) })
- await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
+ await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should fail with a long description', async function () {
const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(60) })
- await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
+ await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should fail with a long support text', async function () {
const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(70) })
- await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
+ await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should succeed with the correct parameters', async function () {
await makePostBodyRequest({
url: server.url,
- path,
+ path: videoChannelPath,
token: server.accessToken,
fields: baseCorrectParams,
statusCodeExpected: 200
@@ -146,7 +144,7 @@ describe('Test videos API validator', function () {
let path: string
before(async function () {
- path = accountPath + accountUUID + '/video-channels/' + videoChannelUUID
+ path = videoChannelPath + '/' + videoChannelUUID
})
it('Should fail with a non authenticated user', async function () {
@@ -196,16 +194,10 @@ describe('Test videos API validator', function () {
})
describe('When getting a video channel', function () {
- let basePath: string
-
- before(async function () {
- basePath = accountPath + accountUUID + '/video-channels'
- })
-
it('Should return the list of the video channels with nothing', async function () {
const res = await makeGetRequest({
url: server.url,
- path: basePath,
+ path: videoChannelPath,
statusCodeExpected: 200
})
@@ -215,7 +207,7 @@ describe('Test videos API validator', function () {
it('Should fail without a correct uuid', async function () {
await makeGetRequest({
url: server.url,
- path: basePath + '/coucou',
+ path: videoChannelPath + '/coucou',
statusCodeExpected: 400
})
})
@@ -223,7 +215,7 @@ describe('Test videos API validator', function () {
it('Should return 404 with an incorrect video channel', async function () {
await makeGetRequest({
url: server.url,
- path: basePath + '/4da6fde3-88f7-4d16-b119-108df5630b06',
+ path: videoChannelPath + '/4da6fde3-88f7-4d16-b119-108df5630b06',
statusCodeExpected: 404
})
})
@@ -231,7 +223,7 @@ describe('Test videos API validator', function () {
it('Should succeed with the correct parameters', async function () {
await makeGetRequest({
url: server.url,
- path: basePath + '/' + videoChannelUUID,
+ path: videoChannelPath + '/' + videoChannelUUID,
statusCodeExpected: 200
})
})
@@ -239,30 +231,26 @@ describe('Test videos API validator', function () {
describe('When deleting a video channel', function () {
it('Should fail with a non authenticated user', async function () {
- await deleteVideoChannel(server.url, 'coucou', accountUUID, videoChannelUUID, 401)
+ await deleteVideoChannel(server.url, 'coucou', videoChannelUUID, 401)
})
it('Should fail with another authenticated user', async function () {
- await deleteVideoChannel(server.url, accessTokenUser, accountUUID, videoChannelUUID, 403)
- })
-
- it('Should fail with an unknown account id', async function () {
- await deleteVideoChannel(server.url, server.accessToken, 454554,videoChannelUUID, 404)
+ await deleteVideoChannel(server.url, accessTokenUser, videoChannelUUID, 403)
})
it('Should fail with an unknown video channel id', async function () {
- await deleteVideoChannel(server.url, server.accessToken, accountUUID,454554, 404)
+ await deleteVideoChannel(server.url, server.accessToken,454554, 404)
})
it('Should succeed with the correct parameters', async function () {
- await deleteVideoChannel(server.url, server.accessToken, accountUUID, videoChannelUUID)
+ await deleteVideoChannel(server.url, server.accessToken, videoChannelUUID)
})
it('Should fail to delete the last user video channel', async function () {
const res = await getVideoChannelsList(server.url, 0, 1)
const lastVideoChannelUUID = res.body.data[0].uuid
- await deleteVideoChannel(server.url, server.accessToken, accountUUID, lastVideoChannelUUID, 409)
+ await deleteVideoChannel(server.url, server.accessToken, lastVideoChannelUUID, 409)
})
})
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 04e7b8c6ac..d24b8ab0bd 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -63,7 +63,7 @@ describe('Test video channels', function () {
description: 'super video channel description',
support: 'super video channel support text'
}
- const res = await addVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannel)
+ const res = await addVideoChannel(servers[0].url, servers[0].accessToken, videoChannel)
videoChannelId = res.body.videoChannel.id
videoChannelUUID = res.body.videoChannel.uuid
@@ -130,7 +130,7 @@ describe('Test video channels', function () {
support: 'video channel support text updated'
}
- await updateVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannelId, videoChannelAttributes)
+ await updateVideoChannel(servers[0].url, servers[0].accessToken, videoChannelId, videoChannelAttributes)
await wait(3000)
})
@@ -149,7 +149,7 @@ describe('Test video channels', function () {
})
it('Should get video channel', async function () {
- const res = await getVideoChannel(servers[0].url, accountUUID, videoChannelId)
+ const res = await getVideoChannel(servers[0].url, videoChannelId)
const videoChannel = res.body
expect(videoChannel.displayName).to.equal('video channel updated')
@@ -161,7 +161,7 @@ describe('Test video channels', function () {
this.timeout(10000)
for (const server of servers) {
- const res = await getVideoChannelVideos(server.url, server.accessToken, accountUUID, videoChannelUUID, 0, 5)
+ const res = await getVideoChannelVideos(server.url, server.accessToken, videoChannelUUID, 0, 5)
expect(res.body.total).to.equal(1)
expect(res.body.data).to.be.an('array')
expect(res.body.data).to.have.lengthOf(1)
@@ -170,7 +170,7 @@ describe('Test video channels', function () {
})
it('Should delete video channel', async function () {
- await deleteVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannelId)
+ await deleteVideoChannel(servers[0].url, servers[0].accessToken, videoChannelId)
})
it('Should have video channel deleted', async function () {
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index 8901f38f97..b8c85f45b3 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -39,7 +39,7 @@ describe('Test video NSFW policy', function () {
getVideosListWithToken(server.url, token),
searchVideoWithToken(server.url, 'n', token),
getAccountVideos(server.url, token, accountUUID, 0, 5),
- getVideoChannelVideos(server.url, token, accountUUID, videoChannelUUID, 0, 5)
+ getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5)
])
}
@@ -47,7 +47,7 @@ describe('Test video NSFW policy', function () {
getVideosList(server.url),
searchVideo(server.url, 'n'),
getAccountVideos(server.url, undefined, accountUUID, 0, 5),
- getVideoChannelVideos(server.url, undefined, accountUUID, videoChannelUUID, 0, 5)
+ getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5)
])
})
}
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts
index 0b4fa89b7e..978e21b199 100644
--- a/server/tests/utils/videos/video-channels.ts
+++ b/server/tests/utils/videos/video-channels.ts
@@ -34,11 +34,10 @@ function getAccountVideoChannelsList (url: string, accountId: number | string, s
function addVideoChannel (
url: string,
token: string,
- accountId: number | string,
videoChannelAttributesArg: VideoChannelAttributes,
expectedStatus = 200
) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels/'
+ const path = '/api/v1/video-channels/'
// Default attributes
let attributes = {
@@ -59,13 +58,12 @@ function addVideoChannel (
function updateVideoChannel (
url: string,
token: string,
- accountId: number | string,
channelId: number | string,
attributes: VideoChannelAttributes,
expectedStatus = 204
) {
const body = {}
- const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId
+ const path = '/api/v1/video-channels/' + channelId
if (attributes.name) body['name'] = attributes.name
if (attributes.description) body['description'] = attributes.description
@@ -79,8 +77,8 @@ function updateVideoChannel (
.expect(expectedStatus)
}
-function deleteVideoChannel (url: string, token: string, accountId: number | string, channelId: number | string, expectedStatus = 204) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId
+function deleteVideoChannel (url: string, token: string, channelId: number | string, expectedStatus = 204) {
+ const path = '/api/v1/video-channels/' + channelId
return request(url)
.delete(path)
@@ -89,8 +87,8 @@ function deleteVideoChannel (url: string, token: string, accountId: number | str
.expect(expectedStatus)
}
-function getVideoChannel (url: string, accountId: number | string, channelId: number | string) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId
+function getVideoChannel (url: string, channelId: number | string) {
+ const path = '/api/v1/video-channels/' + channelId
return request(url)
.get(path)
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index d1d8c07dfa..870dfd21fb 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -186,13 +186,12 @@ function getAccountVideos (url: string, accessToken: string, accountId: number |
function getVideoChannelVideos (
url: string,
accessToken: string,
- accountId: number | string,
videoChannelId: number | string,
start: number,
count: number,
sort?: string
) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels/' + videoChannelId + '/videos'
+ const path = '/api/v1/video-channels/' + videoChannelId + '/videos'
return makeGetRequest({
url,
diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html
index 23162c307c..d41fc39132 100644
--- a/support/doc/api/html/index.html
+++ b/support/doc/api/html/index.html
@@ -27,6 +27,9 @@
<li>
<a href="#operation--accounts--id--get"> GET /accounts/{id} </a>
</li>
+ <li>
+ <a href="#operation--accounts--id--videos-get"> GET /accounts/{id}/videos </a>
+ </li>
<li>
<a href="#operation--accounts-get"> GET /accounts </a>
</li>
@@ -187,19 +190,22 @@
<a href="#operation--video-channels-get"> GET /video-channels </a>
</li>
<li>
- <a href="#operation--accounts--accountId--video-channels-get"> GET /accounts/{accountId}/video-channels </a>
+ <a href="#operation--video-channels-post"> POST /video-channels </a>
+ </li>
+ <li>
+ <a href="#operation--video-channels--id--get"> GET /video-channels/{id} </a>
</li>
<li>
- <a href="#operation--accounts--accountId--video-channels-post"> POST /accounts/{accountId}/video-channels </a>
+ <a href="#operation--video-channels--id--put"> PUT /video-channels/{id} </a>
</li>
<li>
- <a href="#operation--account--accountId--video-channels--id--get"> GET /account/{accountId}/video-channels/{id} </a>
+ <a href="#operation--video-channels--id--delete"> DELETE /video-channels/{id} </a>
</li>
<li>
- <a href="#operation--account--accountId--video-channels--id--put"> PUT /account/{accountId}/video-channels/{id} </a>
+ <a href="#operation--video-channels--id--videos-get"> GET /video-channels/{id}/videos </a>
</li>
<li>
- <a href="#operation--account--accountId--video-channels--id--delete"> DELETE /account/{accountId}/video-channels/{id} </a>
+ <a href="#operation--accounts--accountId--video-channels-get"> GET /accounts/{accountId}/video-channels </a>
</li>
</ul>
</section>
@@ -446,6 +452,117 @@
<span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
}
}
+</code></pre>
+ <!-- </div> -->
+ </section>
+ </div>
+ </div>
+ </div>
+ <div id="operation--accounts--id--videos-get" class="operation panel" data-traverse-target="operation--accounts--id--videos-get">
+ <!-- <section class="operation-tags row"> -->
+ <!-- <div class="doc-copy"> -->
+ <div class="operation-tags">
+ <a class="label" href="#tag-Accounts">Accounts</a>
+ <!---->
+ </div>
+ <!-- </div> -->
+ <!-- </section> -->
+ <h2 class="operation-title">
+ <span class="operation-name">
+ <span class="operation-name">GET</span>
+ <span class="operation-path">/accounts/{id}/videos</span>
+ </span>
+ </h2>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-request-params">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">id</div>
+ <span class="json-property-required"></span>
+ <div class="prop-subtitle"> in path </div>
+ <div class="prop-subtitle">
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </div>
+ </div>
+ <div class="prop-value">
+ <p>The id of the account</p>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples"></div>
+ </div>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-responses">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">200 OK</div>
+ <div class="prop-ref">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/Video">Video</a>
+ </span>
+ </div>
+ <!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
+ </div>
+ <div class="prop-value">
+ <p>successful operation</p>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples">
+ <h5>Response Content-Types:
+ <span>application/json</span>
+ </h5>
+ <section>
+ <h5>Response Example
+ <span>(200 OK)</span>
+ </h5>
+ <!-- <div class="hljs"> --><pre><code class="hljs lang-json">{
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;category&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;licence&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;language&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
+ <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
+ <span class="hljs-attr">&quot;account&quot;</span>: {
+ <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;avatar&quot;</span>: {
+ <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ }
+ }
+}
</code></pre>
<!-- </div> -->
</section>
@@ -1596,54 +1713,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
]
}
@@ -1848,54 +1921,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
]
}
@@ -2125,54 +2154,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
]
}
@@ -4867,54 +4852,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
]
</code></pre>
@@ -4923,7 +4864,7 @@
</div>
</div>
</div>
- <div id="operation--accounts--accountId--video-channels-get" class="operation panel" data-traverse-target="operation--accounts--accountId--video-channels-get">
+ <div id="operation--video-channels-post" class="operation panel" data-traverse-target="operation--video-channels-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@@ -4934,201 +4875,50 @@
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-name">
- <span class="operation-name">GET</span>
- <span class="operation-path">/accounts/{accountId}/video-channels</span>
+ <span class="operation-name">POST</span>
+ <span class="operation-path">/video-channels</span>
</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
- <section class="swagger-request-params">
- <div class="prop-row prop-group">
+ <section class="swagger-request-body">
+ <div class="prop-row">
<div class="prop-name">
- <div class="prop-title">accountId</div>
- <span class="json-property-required"></span>
- <div class="prop-subtitle"> in path </div>
- <div class="prop-subtitle">
- <span class="json-property-type">string</span>
- <span class="json-property-range" title="Value limits"></span>
+ <div class="swagger-request-model">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/VideoChannelInput">VideoChannelInput</a>
+ </span>
</div>
</div>
- <div class="prop-value">
- <p>The account id </p>
+ <div class="prop-value columns small-6">
+ <!-- <div class="swagger-request-description"> -->
+ <p>undefined</p>
+ <!-- </div> -->
</div>
</div>
</section>
</div>
- <div class="doc-examples"></div>
+ <div class="doc-examples">
+ <section>
+ <h5>Request Content-Types:
+ <span>application/json</span>
+ </h5>
+ <h5>Request Example</h5>
+ <!-- <div class="hljs"> --><pre><code class="hljs lang-json">{
+ <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+}
+</code></pre>
+ <!-- </div> -->
+ </section>
+ </div>
</div>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-responses">
<div class="prop-row prop-group">
<div class="prop-name">
- <div class="prop-title">200 OK</div>
- <div class="prop-ref">
- <span class="json-schema-ref-array">
- <a class="json-schema-ref" href="#/definitions/VideoChannel">VideoChannel</a>
- </span>
- </div>
- <!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
- </div>
- <div class="prop-value">
- <p>successful operation</p>
- </div>
- </div>
- <div class="prop-row prop-inner">
- <div class="prop-name">type</div>
- <div class="prop-value">
- <span class="json-property-type">
- <span class="json-schema-ref-array">
- <a class="json-schema-ref" href="#/definitions/VideoChannel">VideoChannel</a>
- </span>
- </span>
- <span class="json-property-range" title="Value limits"></span>
- </div>
- </div>
- </section>
- </div>
- <div class="doc-examples">
- <h5>Response Content-Types:
- <span>application/json</span>
- </h5>
- <section>
- <h5>Response Example
- <span>(200 OK)</span>
- </h5>
- <!-- <div class="hljs"> --><pre><code class="hljs lang-json">[
- {
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
- }
-]
-</code></pre>
- <!-- </div> -->
- </section>
- </div>
- </div>
- </div>
- <div id="operation--accounts--accountId--video-channels-post" class="operation panel" data-traverse-target="operation--accounts--accountId--video-channels-post">
- <!-- <section class="operation-tags row"> -->
- <!-- <div class="doc-copy"> -->
- <div class="operation-tags">
- <a class="label" href="#tag-VideoChannel">VideoChannel</a>
- <!---->
- </div>
- <!-- </div> -->
- <!-- </section> -->
- <h2 class="operation-title">
- <span class="operation-name">
- <span class="operation-name">POST</span>
- <span class="operation-path">/accounts/{accountId}/video-channels</span>
- </span>
- </h2>
- <div class="doc-row">
- <div class="doc-copy">
- <section class="swagger-request-body">
- <div class="prop-row">
- <div class="prop-name">
- <div class="swagger-request-model">
- <span class="">
- <a class="json-schema-ref" href="#/definitions/VideoChannelInput">VideoChannelInput</a>
- </span>
- </div>
- </div>
- <div class="prop-value columns small-6">
- <!-- <div class="swagger-request-description"> -->
- <p>undefined</p>
- <!-- </div> -->
- </div>
- </div>
- </section>
- <section class="swagger-request-params">
- <div class="prop-row prop-group">
- <div class="prop-name">
- <div class="prop-title">accountId</div>
- <span class="json-property-required"></span>
- <div class="prop-subtitle"> in path </div>
- <div class="prop-subtitle">
- <span class="json-property-type">string</span>
- <span class="json-property-range" title="Value limits"></span>
- </div>
- </div>
- <div class="prop-value">
- <p>The account id </p>
- </div>
- </div>
- </section>
- </div>
- <div class="doc-examples">
- <section>
- <h5>Request Content-Types:
- <span>application/json</span>
- </h5>
- <h5>Request Example</h5>
- <!-- <div class="hljs"> --><pre><code class="hljs lang-json">{
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
-}
-</code></pre>
- <!-- </div> -->
- </section>
- </div>
- </div>
- <div class="doc-row">
- <div class="doc-copy">
- <section class="swagger-responses">
- <div class="prop-row prop-group">
- <div class="prop-name">
- <div class="prop-title">204 No Content</div>
+ <div class="prop-title">204 No Content</div>
</div>
<div class="prop-value">
<p>successful operation</p>
@@ -5165,7 +4955,7 @@
</div>
</div>
</div>
- <div id="operation--account--accountId--video-channels--id--get" class="operation panel" data-traverse-target="operation--account--accountId--video-channels--id--get">
+ <div id="operation--video-channels--id--get" class="operation panel" data-traverse-target="operation--video-channels--id--get">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@@ -5177,26 +4967,12 @@
<h2 class="operation-title">
<span class="operation-name">
<span class="operation-name">GET</span>
- <span class="operation-path">/account/{accountId}/video-channels/{id}</span>
+ <span class="operation-path">/video-channels/{id}</span>
</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-request-params">
- <div class="prop-row prop-group">
- <div class="prop-name">
- <div class="prop-title">accountId</div>
- <span class="json-property-required"></span>
- <div class="prop-subtitle"> in path </div>
- <div class="prop-subtitle">
- <span class="json-property-type">string</span>
- <span class="json-property-range" title="Value limits"></span>
- </div>
- </div>
- <div class="prop-value">
- <p>The account id </p>
- </div>
- </div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">id</div>
@@ -5246,54 +5022,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
</code></pre>
<!-- </div> -->
@@ -5301,7 +5033,7 @@
</div>
</div>
</div>
- <div id="operation--account--accountId--video-channels--id--put" class="operation panel" data-traverse-target="operation--account--accountId--video-channels--id--put">
+ <div id="operation--video-channels--id--put" class="operation panel" data-traverse-target="operation--video-channels--id--put">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@@ -5313,7 +5045,7 @@
<h2 class="operation-title">
<span class="operation-name">
<span class="operation-name">PUT</span>
- <span class="operation-path">/account/{accountId}/video-channels/{id}</span>
+ <span class="operation-path">/video-channels/{id}</span>
</span>
</h2>
<div class="doc-row">
@@ -5335,20 +5067,6 @@
</div>
</section>
<section class="swagger-request-params">
- <div class="prop-row prop-group">
- <div class="prop-name">
- <div class="prop-title">accountId</div>
- <span class="json-property-required"></span>
- <div class="prop-subtitle"> in path </div>
- <div class="prop-subtitle">
- <span class="json-property-type">string</span>
- <span class="json-property-range" title="Value limits"></span>
- </div>
- </div>
- <div class="prop-value">
- <p>The account id </p>
- </div>
- </div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">id</div>
@@ -5422,7 +5140,7 @@
</div>
</div>
</div>
- <div id="operation--account--accountId--video-channels--id--delete" class="operation panel" data-traverse-target="operation--account--accountId--video-channels--id--delete">
+ <div id="operation--video-channels--id--delete" class="operation panel" data-traverse-target="operation--video-channels--id--delete">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@@ -5434,26 +5152,12 @@
<h2 class="operation-title">
<span class="operation-name">
<span class="operation-name">DELETE</span>
- <span class="operation-path">/account/{accountId}/video-channels/{id}</span>
+ <span class="operation-path">/video-channels/{id}</span>
</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-request-params">
- <div class="prop-row prop-group">
- <div class="prop-name">
- <div class="prop-title">accountId</div>
- <span class="json-property-required"></span>
- <div class="prop-subtitle"> in path </div>
- <div class="prop-subtitle">
- <span class="json-property-type">string</span>
- <span class="json-property-range" title="Value limits"></span>
- </div>
- </div>
- <div class="prop-value">
- <p>The account id </p>
- </div>
- </div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">id</div>
@@ -5514,6 +5218,208 @@
</div>
</div>
</div>
+ <div id="operation--video-channels--id--videos-get" class="operation panel" data-traverse-target="operation--video-channels--id--videos-get">
+ <!-- <section class="operation-tags row"> -->
+ <!-- <div class="doc-copy"> -->
+ <div class="operation-tags">
+ <a class="label" href="#tag-VideoChannel">VideoChannel</a>
+ <!---->
+ </div>
+ <!-- </div> -->
+ <!-- </section> -->
+ <h2 class="operation-title">
+ <span class="operation-name">
+ <span class="operation-name">GET</span>
+ <span class="operation-path">/video-channels/{id}/videos</span>
+ </span>
+ </h2>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-request-params">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">id</div>
+ <span class="json-property-required"></span>
+ <div class="prop-subtitle"> in path </div>
+ <div class="prop-subtitle">
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </div>
+ </div>
+ <div class="prop-value">
+ <p>The video channel id </p>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples"></div>
+ </div>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-responses">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">200 OK</div>
+ <div class="prop-ref">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/Video">Video</a>
+ </span>
+ </div>
+ <!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
+ </div>
+ <div class="prop-value">
+ <p>successful operation</p>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples">
+ <h5>Response Content-Types:
+ <span>application/json</span>
+ </h5>
+ <section>
+ <h5>Response Example
+ <span>(200 OK)</span>
+ </h5>
+ <!-- <div class="hljs"> --><pre><code class="hljs lang-json">{
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;category&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;licence&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;language&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ },
+ <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
+ <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
+ <span class="hljs-attr">&quot;account&quot;</span>: {
+ <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;avatar&quot;</span>: {
+ <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ }
+ }
+}
+</code></pre>
+ <!-- </div> -->
+ </section>
+ </div>
+ </div>
+ </div>
+ <div id="operation--accounts--accountId--video-channels-get" class="operation panel" data-traverse-target="operation--accounts--accountId--video-channels-get">
+ <!-- <section class="operation-tags row"> -->
+ <!-- <div class="doc-copy"> -->
+ <div class="operation-tags">
+ <a class="label" href="#tag-VideoChannel">VideoChannel</a>
+ <!---->
+ </div>
+ <!-- </div> -->
+ <!-- </section> -->
+ <h2 class="operation-title">
+ <span class="operation-name">
+ <span class="operation-name">GET</span>
+ <span class="operation-path">/accounts/{accountId}/video-channels</span>
+ </span>
+ </h2>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-request-params">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">accountId</div>
+ <span class="json-property-required"></span>
+ <div class="prop-subtitle"> in path </div>
+ <div class="prop-subtitle">
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </div>
+ </div>
+ <div class="prop-value">
+ <p>The account id </p>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples"></div>
+ </div>
+ <div class="doc-row">
+ <div class="doc-copy">
+ <section class="swagger-responses">
+ <div class="prop-row prop-group">
+ <div class="prop-name">
+ <div class="prop-title">200 OK</div>
+ <div class="prop-ref">
+ <span class="json-schema-ref-array">
+ <a class="json-schema-ref" href="#/definitions/VideoChannel">VideoChannel</a>
+ </span>
+ </div>
+ <!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
+ </div>
+ <div class="prop-value">
+ <p>successful operation</p>
+ </div>
+ </div>
+ <div class="prop-row prop-inner">
+ <div class="prop-name">type</div>
+ <div class="prop-value">
+ <span class="json-property-type">
+ <span class="json-schema-ref-array">
+ <a class="json-schema-ref" href="#/definitions/VideoChannel">VideoChannel</a>
+ </span>
+ </span>
+ <span class="json-property-range" title="Value limits"></span>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div class="doc-examples">
+ <h5>Response Content-Types:
+ <span>application/json</span>
+ </h5>
+ <section>
+ <h5>Response Example
+ <span>(200 OK)</span>
+ </h5>
+ <!-- <div class="hljs"> --><pre><code class="hljs lang-json">[
+ {
+ <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
+ <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
+ }
+ }
+]
+</code></pre>
+ <!-- </div> -->
+ </section>
+ </div>
+ </div>
+ </div>
<h1 id="tag-VideoComment" class="swagger-summary-tag" data-traverse-target="tag-VideoComment">VideoComment</h1>
<div id="operation--videos--videoId--comment-threads-get" class="operation panel" data-traverse-target="operation--videos--videoId--comment-threads-get">
<!-- <section class="operation-tags row"> -->
@@ -6760,20 +6666,11 @@
<span class="json-property-type">boolean</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
- <dt data-property-name="owner">
- <span class="json-property-name">owner:</span>
+ <dt data-property-name="ownerAccount">
+ <span class="json-property-name">ownerAccount:</span>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
- <dt data-property-name="videos">
- <span class="json-property-name">videos:</span>
- <span class="json-property-type">
- <span class="json-schema-ref-array">
- <a class="json-schema-ref" href="#/definitions/Video">Video</a>
- </span>
- </span>
- <span class="json-property-range" title="Value limits"></span>
- </dt>
</dl>
</section>
</div>
@@ -6784,54 +6681,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
</code></pre>
<!-- </div> -->
@@ -7394,54 +7247,10 @@
<span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;owner&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
+ <span class="hljs-attr">&quot;ownerAccount&quot;</span>: {
+ <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
<span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;videos&quot;</span>: [
- {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;uuid&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;publishedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;category&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;licence&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;language&quot;</span>: {
- <span class="hljs-attr">&quot;id&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;label&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- },
- <span class="hljs-attr">&quot;privacy&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;description&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;duration&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;isLocal&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;thumbnailPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;previewPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;embedPath&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;views&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;likes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;dislikes&quot;</span>: <span class="hljs-string">&quot;number&quot;</span>,
- <span class="hljs-attr">&quot;nsfw&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>,
- <span class="hljs-attr">&quot;account&quot;</span>: {
- <span class="hljs-attr">&quot;name&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;displayName&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;url&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;avatar&quot;</span>: {
- <span class="hljs-attr">&quot;path&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;createdAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
- <span class="hljs-attr">&quot;updatedAt&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
- }
- }
- }
- ]
+ }
}
]
}
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 56941031bc..46b73145a0 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1017,27 +1017,6 @@ paths:
type: array
items:
$ref: '#/definitions/VideoChannel'
- /accounts/{accountId}/video-channels:
- get:
- tags:
- - VideoChannel
- consumes:
- - application/json
- produces:
- - application/json
- parameters:
- - name: accountId
- in: path
- required: true
- type: string
- description: 'The account id '
- responses:
- '200':
- description: successful operation
- schema:
- type: array
- items:
- $ref: '#/definitions/VideoChannel'
post:
security:
- OAuth2: [ ]
@@ -1048,11 +1027,6 @@ paths:
produces:
- application/json
parameters:
- - name: accountId
- in: path
- required: true
- type: string
- description: 'The account id '
- in: body
name: body
schema:
@@ -1060,7 +1034,7 @@ paths:
responses:
'204':
description: successful operation
- "/account/{accountId}/video-channels/{id}":
+ "/video-channels/{id}":
get:
tags:
- VideoChannel
@@ -1069,11 +1043,6 @@ paths:
produces:
- application/json
parameters:
- - name: accountId
- in: path
- required: true
- type: string
- description: 'The account id '
- name: id
in: path
required: true
@@ -1094,11 +1063,6 @@ paths:
produces:
- application/json
parameters:
- - name: accountId
- in: path
- required: true
- type: string
- description: 'The account id '
- name: id
in: path
required: true
@@ -1121,20 +1085,34 @@ paths:
produces:
- application/json
parameters:
- - name: accountId
+ - name: id
in: path
required: true
type: string
- description: 'The account id '
+ description: 'The video channel id '
+ responses:
+ '204':
+ description: successful operation
+ "/video-channels/{id}/videos":
+ get:
+ tags:
+ - VideoChannel
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
- name: id
in: path
required: true
type: string
description: 'The video channel id '
responses:
- '204':
+ '200':
description: successful operation
- "/account/{accountId}/video-channels/{id}/videos":
+ schema:
+ $ref: '#/definitions/Video'
+ /accounts/{accountId}/video-channels:
get:
tags:
- VideoChannel
@@ -1148,16 +1126,13 @@ paths:
required: true
type: string
description: 'The account id '
- - name: id
- in: path
- required: true
- type: string
- description: 'The video channel id '
responses:
'200':
description: successful operation
schema:
- $ref: '#/definitions/Video'
+ type: array
+ items:
+ $ref: '#/definitions/VideoChannel'
"/videos/{videoId}/comment-threads":
get:
tags: