]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/extra-utils/overviews/overviews-command.ts
Specify if we want to fallback to the server token
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / overviews / overviews-command.ts
CommitLineData
23a3a882
C
1import { HttpStatusCode } from '@shared/core-utils'
2import { VideosOverview } from '@shared/models'
3import { AbstractCommand, OverrideCommandOptions } from '../shared'
4
5export class OverviewsCommand extends AbstractCommand {
6
7 getVideos (options: OverrideCommandOptions & {
8 page: number
23a3a882 9 }) {
a1637fa1 10 const { page } = options
23a3a882
C
11 const path = '/api/v1/overviews/videos'
12
13 const query = { page }
14
15 return this.getRequestBody<VideosOverview>({
16 ...options,
17
23a3a882
C
18 path,
19 query,
a1637fa1 20 implicitToken: false,
23a3a882
C
21 defaultExpectedStatus: HttpStatusCode.OK_200
22 })
23 }
24}