this.accountService.accountLoaded
.pipe(
tap(account => this.account = account),
- flatMap(account => this.videoChannelService.listAccountVideoChannels(account.id)),
+ flatMap(account => this.videoChannelService.listAccountVideoChannels(account)),
map(res => res.data)
)
.subscribe(videoChannels => this.videoChannels = videoChannels)
private loadVideoChannels () {
this.authService.userInformationLoaded
- .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account.id)))
+ .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account)))
.subscribe(res => this.videoChannels = res.data)
}
}
</div>
<div class="actor-followers">{{ videoChannel.followersCount }} subscribers</div>
- <a [routerLink]="[ '/accounts', videoChannel.ownerAccount.id ]" title="Go the owner account page" class="actor-owner">
+ <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" title="Go the owner account page" class="actor-owner">
<span>Created by {{ videoChannel.ownerBy }}</span>
<img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" />
</a>
<ul *dropdownMenu class="dropdown-menu">
<li>
- <a i18n [routerLink]="[ '/accounts', user.account?.id ]" class="dropdown-item" title="My public profile">
+ <a i18n [routerLink]="[ '/accounts', user.account?.nameWithHost ]" class="dropdown-item" title="My public profile">
My public profile
</a>
export class Account extends Actor implements ServerAccount {
displayName: string
description: string
+ nameWithHost: string
constructor (hash: ServerAccount) {
super(hash)
this.displayName = hash.displayName
this.description = hash.description
+ this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
}
}
-import { Account, hasUserRight, User as UserServerModel, UserRight, UserRole, VideoChannel } from '../../../../../shared'
+import {
+ Account as AccountServerModel,
+ hasUserRight,
+ User as UserServerModel,
+ UserRight,
+ UserRole,
+ VideoChannel
+} from '../../../../../shared'
import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type'
import { Actor } from '@app/shared/actor/actor.model'
+import { Account } from '@app/shared/account/account.model'
export type UserConstructorHash = {
id: number,
nsfwPolicy?: NSFWPolicyType,
autoPlayVideo?: boolean,
createdAt?: Date,
- account?: Account,
+ account?: AccountServerModel,
videoChannels?: VideoChannel[]
}
export class User implements UserServerModel {
this.username = hash.username
this.email = hash.email
this.role = hash.role
- this.account = hash.account
+
+ if (hash.account !== undefined) {
+ this.account = new Account(hash.account)
+ }
if (hash.videoChannels !== undefined) {
this.videoChannels = hash.videoChannels
this[key] = obj[key]
}
+ if (obj.account !== undefined) {
+ this.account = new Account(obj.account)
+ }
+
this.updateComputedAttributes()
}
import { ResultList } from '../../../../../shared'
import { VideoChannel } from './video-channel.model'
import { environment } from '../../../environments/environment'
+import { Account } from '@app/shared/account/account.model'
@Injectable()
export class VideoChannelService {
)
}
- listAccountVideoChannels (accountId: number): Observable<ResultList<VideoChannel>> {
- return this.authHttp.get<ResultList<VideoChannelServer>>(AccountService.BASE_ACCOUNT_URL + accountId + '/video-channels')
+ listAccountVideoChannels (account: Account): Observable<ResultList<VideoChannel>> {
+ return this.authHttp.get<ResultList<VideoChannelServer>>(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels')
.pipe(
map(res => this.extractVideoChannels(res)),
catchError((res) => this.restExtractor.handleError(res))
import { UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile } from '../../../../../shared'
-import { Account } from '../../../../../shared/models/actors'
import { AuthUser } from '../../core'
import { Video } from '../../shared/video/video.model'
+import { Account } from '@app/shared/account/account.model'
export class VideoDetails extends Video implements VideoDetailsServerModel {
descriptionPath: string
this.descriptionPath = hash.descriptionPath
this.files = hash.files
this.channel = hash.channel
- this.account = hash.account
+ this.account = new Account(hash.account)
this.tags = hash.tags
this.support = hash.support
this.commentsEnabled = hash.commentsEnabled
class="video-miniature-name"
[routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur() }"
>
- {{ video.name }}
+ {{ video.name }}
</a>
<span class="video-miniature-created-at-views">{{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
- <a class="video-miniature-account" [routerLink]="[ '/accounts', video.account.id ]">{{ video.by }}</a>
+ <a class="video-miniature-account" [routerLink]="[ '/accounts', video.by ]">{{ video.by }}</a>
</div>
</div>
params = this.restService.addRestGetParams(params, pagination, sort)
return this.authHttp
- .get(AccountService.BASE_ACCOUNT_URL + account.id + '/videos', { params })
+ .get(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/videos', { params })
.pipe(
map(this.extractVideos),
catchError(res => this.restExtractor.handleError(res))
}),
switchMap(video => {
return this.videoChannelService
- .listAccountVideoChannels(video.account.id)
+ .listAccountVideoChannels(video.account)
.pipe(
map(result => result.data),
map(videoChannels => videoChannels.map(c => ({ id: c.id, label: c.displayName }))),
</div>
<div class="video-info-by">
- <a [routerLink]="[ '/accounts', video.account.id ]" title="Go the account page">
+ <a [routerLink]="[ '/accounts', video.by ]" title="Go the account page">
<span>By {{ video.by }}</span>
<img [src]="video.accountAvatarUrl" alt="Account avatar" />
</a>
setDefaultPagination,
setDefaultSort
} from '../../middlewares'
-import { accountsGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
+import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
import { AccountModel } from '../../models/account/account'
import { VideoModel } from '../../models/video/video'
import { isNSFWHidden } from '../../helpers/express-utils'
asyncMiddleware(listAccounts)
)
-accountsRouter.get('/:id',
- asyncMiddleware(accountsGetValidator),
+accountsRouter.get('/:accountName',
+ asyncMiddleware(accountsNameWithHostGetValidator),
getAccount
)
-accountsRouter.get('/:id/videos',
- asyncMiddleware(accountsGetValidator),
+accountsRouter.get('/:accountName/videos',
+ asyncMiddleware(accountsNameWithHostGetValidator),
paginationValidator,
videosSortValidator,
setDefaultSort,
asyncMiddleware(listAccountVideos)
)
-accountsRouter.get('/:accountId/video-channels',
+accountsRouter.get('/:accountName/video-channels',
asyncMiddleware(listVideoAccountChannelsValidator),
asyncMiddleware(listVideoAccountChannels)
)
asyncMiddleware(oembedValidator),
generateOEmbed
)
-servicesRouter.use('/redirect/accounts/:nameWithHost',
+servicesRouter.use('/redirect/accounts/:accountName',
asyncMiddleware(accountsNameWithHostGetValidator),
redirectToAccountUrl
)
import { AccountModel } from '../../models/account/account'
import { isUserDescriptionValid, isUserUsernameValid } from './users'
import { exists } from './misc'
+import { CONFIG } from '../../initializers'
function isAccountNameValid (value: string) {
return isUserUsernameValid(value)
const [ accountName, host ] = nameWithDomain.split('@')
let promise: Bluebird<AccountModel>
- if (!host) promise = AccountModel.loadLocalByName(accountName)
+ if (!host || host === CONFIG.WEBSERVER.HOST) promise = AccountModel.loadLocalByName(accountName)
else promise = AccountModel.loadLocalByNameAndHost(accountName, host)
return isAccountExist(promise, res, sendNotFound)
import * as express from 'express'
import { param } from 'express-validator/check'
-import {
- isAccountIdExist,
- isAccountIdValid,
- isAccountNameValid,
- isAccountNameWithHostExist,
- isLocalAccountNameExist
-} from '../../helpers/custom-validators/accounts'
+import { isAccountNameValid, isAccountNameWithHostExist, isLocalAccountNameExist } from '../../helpers/custom-validators/accounts'
import { logger } from '../../helpers/logger'
import { areValidationErrors } from './utils'
-import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
const localAccountValidator = [
param('name').custom(isAccountNameValid).withMessage('Should have a valid account name'),
}
]
-const accountsGetValidator = [
- param('id').custom(isAccountIdValid).withMessage('Should have a valid id/uuid/name/name with host'),
-
- async (req: express.Request, res: express.Response, next: express.NextFunction) => {
- logger.debug('Checking accountsGetValidator parameters', { parameters: req.params })
-
- if (areValidationErrors(req, res)) return
-
- let accountFetched = false
- if (isIdOrUUIDValid(req.params.id)) accountFetched = await isAccountIdExist(req.params.id, res, false)
- if (!accountFetched) accountFetched = await isAccountNameWithHostExist(req.params.id, res, true)
-
- if (!accountFetched) return
-
- return next()
- }
-]
-
const accountsNameWithHostGetValidator = [
- param('nameWithHost').exists().withMessage('Should have an account name with host'),
+ param('accountName').exists().withMessage('Should have an account name with host'),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params })
if (areValidationErrors(req, res)) return
- if (!await isAccountNameWithHostExist(req.params.nameWithHost, res)) return
+ if (!await isAccountNameWithHostExist(req.params.accountName, res)) return
return next()
}
export {
localAccountValidator,
- accountsGetValidator,
accountsNameWithHostGetValidator
}
import * as express from 'express'
import { body, param } from 'express-validator/check'
import { UserRight } from '../../../shared'
-import { isAccountIdExist } from '../../helpers/custom-validators/accounts'
+import { isAccountIdExist, isAccountNameWithHostExist } from '../../helpers/custom-validators/accounts'
import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
import {
isVideoChannelDescriptionValid,
import { areValidationErrors } from './utils'
const listVideoAccountChannelsValidator = [
- param('accountId').custom(isIdOrUUIDValid).withMessage('Should have a valid account id'),
+ param('accountName').exists().withMessage('Should have a valid account name'),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking listVideoAccountChannelsValidator parameters', { parameters: req.body })
if (areValidationErrors(req, res)) return
- if (!await isAccountIdExist(req.params.accountId, res)) return
+ if (!await isAccountNameWithHostExist(req.params.accountName, res)) return
return next()
}
})
describe('When getting an account', function () {
- it('Should return 404 with a non existing id', async function () {
- await getAccount(server.url, 4545454, 404)
+ it('Should return 404 with a non existing name', async function () {
+ await getAccount(server.url, 'arfaze', 404)
})
})
createUser,
deleteVideoChannel,
flushTests,
- getAccountVideoChannelsList, getMyUserInformation,
+ getAccountVideoChannelsList,
+ getMyUserInformation,
getVideoChannelsList,
immutableAssign,
killallServers,
userLogin
} from '../../utils'
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params'
-import { getAccountsList } from '../../utils/users/accounts'
import { User } from '../../../../shared/models/users'
const expect = chai.expect
})
describe('When listing account video channels', function () {
- it('Should fail with bad account', async function () {
- await getAccountVideoChannelsList(server.url, 'hello', 400)
- })
-
it('Should fail with a unknown account', async function () {
- await getAccountVideoChannelsList(server.url, 154, 404)
+ await getAccountVideoChannelsList(server.url, 'unknown', 404)
})
})
const path = '/api/v1/videos/'
let server: ServerInfo
let userAccessToken = ''
- let accountUUID: string
+ let accountName: string
let channelId: number
let channelUUID: string
let videoId
const res = await getMyUserInformation(server.url, server.accessToken)
channelId = res.body.videoChannels[ 0 ].id
channelUUID = res.body.videoChannels[ 0 ].uuid
- accountUUID = res.body.account.uuid
+ accountName = res.body.account.name + '@' + res.body.account.host
}
})
let path: string
before(async function () {
- path = '/api/v1/accounts/' + accountUUID + '/videos'
+ path = '/api/v1/accounts/' + accountName + '/videos'
})
it('Should fail with a bad start pagination', async function () {
describe('Test users with multiple servers', function () {
let servers: ServerInfo[] = []
let user: User
- let userAccountUUID: string
+ let userAccountName: string
let userVideoChannelUUID: string
let userId: number
let videoUUID: string
password: 'password'
}
const res = await createUser(servers[ 0 ].url, servers[ 0 ].accessToken, user.username, user.password)
- userAccountUUID = res.body.user.account.uuid
userId = res.body.user.id
-
userAccessToken = await userLogin(servers[ 0 ], user)
}
+ {
+ const res = await getMyUserInformation(servers[0].url, userAccessToken)
+ userAccountName = res.body.account.name + '@' + res.body.account.host
+ }
+
{
const res = await getMyUserInformation(servers[ 0 ].url, servers[ 0 ].accessToken)
const user: User = res.body
const rootServer1List = resAccounts.body.data.find(a => a.name === 'root' && a.host === 'localhost:9001') as Account
expect(rootServer1List).not.to.be.undefined
- const resAccount = await getAccount(server.url, rootServer1List.id)
+ const resAccount = await getAccount(server.url, rootServer1List.name + '@' + rootServer1List.host)
const rootServer1Get = resAccount.body as Account
expect(rootServer1Get.name).to.equal('root')
expect(rootServer1Get.host).to.equal('localhost:9001')
it('Should list account videos', async function () {
for (const server of servers) {
- const res = await getAccountVideos(server.url, server.accessToken, userAccountUUID, 0, 5)
+ const res = await getAccountVideos(server.url, server.accessToken, userAccountName, 0, 5)
expect(res.body.total).to.equal(1)
expect(res.body.data).to.be.an('array')
it('Should not have actor files', async () => {
for (const server of servers) {
- await checkActorFilesWereRemoved(userAccountUUID, server.serverNumber)
+ await checkActorFilesWereRemoved(userAccountName, server.serverNumber)
await checkActorFilesWereRemoved(userVideoChannelUUID, server.serverNumber)
}
})
setAccessTokensToServers,
updateVideoChannel
} from '../../utils/index'
-import { getAccountsList } from '../../utils/users/accounts'
const expect = chai.expect
})
it('Should have two video channels when getting account channels on server 1', async function () {
- const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.uuid)
+ const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.name + '@' + userInfo.account.host)
expect(res.body.total).to.equal(2)
expect(res.body.data).to.be.an('array')
expect(res.body.data).to.have.lengthOf(2)
})
it('Should have one video channel when getting account channels on server 2', async function () {
- const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.uuid)
+ const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.name + '@' + userInfo.account.host)
expect(res.body.total).to.equal(1)
expect(res.body.data).to.be.an('array')
expect(res.body.data).to.have.lengthOf(1)
.then(res => {
const user: User = res.body
const videoChannelUUID = user.videoChannels[0].uuid
- const accountUUID = user.account.uuid
+ const accountName = user.account.name + '@' + user.account.host
if (token) {
return Promise.all([
getVideosListWithToken(server.url, token),
searchVideoWithToken(server.url, 'n', token),
- getAccountVideos(server.url, token, accountUUID, 0, 5),
+ getAccountVideos(server.url, token, accountName, 0, 5),
getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5)
])
}
return Promise.all([
getVideosList(server.url),
searchVideo(server.url, 'n'),
- getAccountVideos(server.url, undefined, accountUUID, 0, 5),
+ getAccountVideos(server.url, undefined, accountName, 0, 5),
getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5)
])
})
})
}
-function getAccount (url: string, accountId: number | string, statusCodeExpected = 200) {
- const path = '/api/v1/accounts/' + accountId
+function getAccount (url: string, accountName: string, statusCodeExpected = 200) {
+ const path = '/api/v1/accounts/' + accountName
return makeGetRequest({
url,
.expect('Content-Type', /json/)
}
-function getAccountVideoChannelsList (url: string, accountId: number | string, specialStatus = 200) {
- const path = '/api/v1/accounts/' + accountId + '/video-channels'
+function getAccountVideoChannelsList (url: string, accountName: string, specialStatus = 200) {
+ const path = '/api/v1/accounts/' + accountName + '/video-channels'
return request(url)
.get(path)
.expect('Content-Type', /json/)
}
-function getAccountVideos (url: string, accessToken: string, accountId: number | string, start: number, count: number, sort?: string) {
- const path = '/api/v1/accounts/' + accountId + '/videos'
+function getAccountVideos (url: string, accessToken: string, accountName: string, start: number, count: number, sort?: string) {
+ const path = '/api/v1/accounts/' + accountName + '/videos'
return makeGetRequest({
url,
<a href="#tag-Accounts">Accounts</a>
<ul>
<li>
- <a href="#operation--accounts--id--get"> GET /accounts/{id} </a>
+ <a href="#operation--accounts--name--get"> GET /accounts/{name} </a>
</li>
<li>
- <a href="#operation--accounts--id--videos-get"> GET /accounts/{id}/videos </a>
+ <a href="#operation--accounts--name--videos-get"> GET /accounts/{name}/videos </a>
</li>
<li>
<a href="#operation--accounts-get"> GET /accounts </a>
<a href="#operation--video-channels--id--videos-get"> GET /video-channels/{id}/videos </a>
</li>
<li>
- <a href="#operation--accounts--accountId--video-channels-get"> GET /accounts/{accountId}/video-channels </a>
+ <a href="#operation--accounts--name--video-channels-get"> GET /accounts/{name}/video-channels </a>
</li>
</ul>
</section>
</div>
</div>
<h1 id="tag-Accounts" class="swagger-summary-tag" data-traverse-target="tag-Accounts">Accounts</h1>
- <div id="operation--accounts--id--get" class="operation panel" data-traverse-target="operation--accounts--id--get">
+ <div id="operation--accounts--name--get" class="operation panel" data-traverse-target="operation--accounts--name--get">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
<h2 class="operation-title">
<span class="operation-name">
<span class="operation-name">GET</span>
- <span class="operation-path">/accounts/{id}</span>
+ <span class="operation-path">/accounts/{name}</span>
</span>
</h2>
<div class="doc-row">
<section class="swagger-request-params">
<div class="prop-row prop-group">
<div class="prop-name">
- <div class="prop-title">id</div>
+ <div class="prop-title">name</div>
<span class="json-property-required"></span>
<div class="prop-subtitle"> in path </div>
<div class="prop-subtitle">
</div>
</div>
<div class="prop-value">
- <p>The id of the account</p>
+ <p>The name of the account (chocobozzz or
+ <a href="mailto:chocobozzz@peertube.cpy.re">chocobozzz@peertube.cpy.re</a> for example)</p>
</div>
</div>
<div class="prop-row prop-group">
</div>
</div>
</div>
- <div id="operation--accounts--id--videos-get" class="operation panel" data-traverse-target="operation--accounts--id--videos-get">
+ <div id="operation--accounts--name--videos-get" class="operation panel" data-traverse-target="operation--accounts--name--videos-get">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
<h2 class="operation-title">
<span class="operation-name">
<span class="operation-name">GET</span>
- <span class="operation-path">/accounts/{id}/videos</span>
+ <span class="operation-path">/accounts/{name}/videos</span>
</span>
</h2>
<div class="doc-row">
<section class="swagger-request-params">
<div class="prop-row prop-group">
<div class="prop-name">
- <div class="prop-title">id</div>
+ <div class="prop-title">name</div>
<span class="json-property-required"></span>
<div class="prop-subtitle"> in path </div>
<div class="prop-subtitle">
</div>
</div>
<div class="prop-value">
- <p>The id of the account</p>
+ <p>The name of the account (chocobozzz or
+ <a href="mailto:chocobozzz@peertube.cpy.re">chocobozzz@peertube.cpy.re</a> for example)</p>
</div>
</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">
+ <div id="operation--accounts--name--video-channels-get" class="operation panel" data-traverse-target="operation--accounts--name--video-channels-get">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
<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-path">/accounts/{name}/video-channels</span>
</span>
</h2>
<div class="doc-row">
<section class="swagger-request-params">
<div class="prop-row prop-group">
<div class="prop-name">
- <div class="prop-title">accountId</div>
+ <div class="prop-title">name</div>
<span class="json-property-required"></span>
<div class="prop-subtitle"> in path </div>
<div class="prop-subtitle">
</div>
</div>
<div class="prop-value">
- <p>The account id </p>
+ <p>The name of the account (chocobozzz or
+ <a href="mailto:chocobozzz@peertube.cpy.re">chocobozzz@peertube.cpy.re</a> for example)</p>
</div>
</div>
</section>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="name">
+ <span class="json-property-name">name:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="displayName">
+ <span class="json-property-name">displayName:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="url">
+ <span class="json-property-name">url:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="host">
+ <span class="json-property-name">host:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="avatar">
+ <span class="json-property-name">avatar:</span>
+ <span class="json-property-type">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/Avatar">Avatar</a>
+ </span>
+ </span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
</dl>
</section>
</div>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="id">
+ <span class="json-property-name">id:</span>
+ <span class="json-property-type">number</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="name">
+ <span class="json-property-name">name:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="uuid">
+ <span class="json-property-name">uuid:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="url">
+ <span class="json-property-name">url:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
<dt data-property-name="createdAt">
<span class="json-property-name">createdAt:</span>
<span class="json-property-type">string</span>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="id">
+ <span class="json-property-name">id:</span>
+ <span class="json-property-type">number</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="uuid">
+ <span class="json-property-name">uuid:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
</dl>
</section>
</div>
</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/VideoCommentThreadTree">VideoCommentThreadTree</a>
+ </span>
+ </span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
</dl>
</section>
</div>
</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/VideoChannel">VideoChannel</a>
+ </span>
+ </span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
</dl>
</section>
</div>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="allowed">
+ <span class="json-property-name">allowed:</span>
+ <span class="json-property-type">boolean</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
<dt data-property-name="transcoding">
<span class="json-property-name">transcoding:</span>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="enabledResolutions">
+ <span class="json-property-name">enabledResolutions:</span>
+ <span class="json-property-type">number[]</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">number</span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
+ </dl>
+ </section>
+ </dt>
<dt data-property-name="avatar">
<span class="json-property-name">avatar:</span>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="file">
+ <span class="json-property-name">file:</span>
+ <span class="json-property-type">object</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="size">
+ <span class="json-property-name">size:</span>
+ <span class="json-property-type">object</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="max">
+ <span class="json-property-name">max:</span>
+ <span class="json-property-type">number</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
+ </dl>
+ </section>
+ </dt>
+ <dt data-property-name="extensions">
+ <span class="json-property-name">extensions:</span>
+ <span class="json-property-type">string[]</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
+ </dl>
+ </section>
+ </dt>
<dt data-property-name="video">
<span class="json-property-name">video:</span>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="file">
+ <span class="json-property-name">file:</span>
+ <span class="json-property-type">object</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="extensions">
+ <span class="json-property-name">extensions:</span>
+ <span class="json-property-type">string[]</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
+ </dl>
+ </section>
+ </dt>
+ </dl>
+ </section>
+ </dt>
</dl>
</section>
</div>
<span class="json-property-type">object</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-properties">
+ <dl>
+ <dt data-property-name="id">
+ <span class="json-property-name">id:</span>
+ <span class="json-property-type">number</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ <dt data-property-name="uuid">
+ <span class="json-property-name">uuid:</span>
+ <span class="json-property-type">string</span>
+ <span class="json-property-range" title="Value limits"></span>
+ </dt>
+ </dl>
+ </section>
+ </dt>
</dl>
</section>
</div>
</span>
<span class="json-property-range" title="Value limits"></span>
</dt>
+ <dt class="json-inner-schema">
+ <section class="json-schema-array-items">
+ <span class="json-property-type">
+ <span class="">
+ <a class="json-schema-ref" href="#/definitions/VideoComment">VideoComment</a>
+ </span>
+ </span>
+ <span class="json-property-range" title="Value limits"></span>
+ <div class="json-inner-schema"> </div>
+ </section>
+ </dt>
</dl>
</section>
</div>
schemes:
- https
paths:
- '/accounts/{id}':
+ '/accounts/{name}':
get:
tags:
- Accounts
produces:
- application/json
parameters:
- - name: id
+ - name: name
in: path
required: true
type: string
- description: 'The id of the account'
+ description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
- name: start
in: query
required: false
description: successful operation
schema:
$ref: '#/definitions/Account'
- '/accounts/{id}/videos':
+ '/accounts/{name}/videos':
get:
tags:
- Accounts
produces:
- application/json
parameters:
- - name: id
+ - name: name
in: path
required: true
type: string
- description: 'The id of the account'
+ description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
responses:
'200':
description: successful operation
description: successful operation
schema:
$ref: '#/definitions/Video'
- /accounts/{accountId}/video-channels:
+ /accounts/{name}/video-channels:
get:
tags:
- VideoChannel
produces:
- application/json
parameters:
- - name: accountId
+ - name: name
in: path
required: true
type: string
- description: 'The account id '
+ description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
responses:
'200':
description: successful operation