1
0
Fork 0
peertube/shared/extra-utils/overviews/overviews-command.ts

24 lines
550 B
TypeScript
Raw Normal View History

2021-07-16 08:27:30 -04:00
import { HttpStatusCode, VideosOverview } from '@shared/models'
2021-07-06 08:30:20 -04:00
import { AbstractCommand, OverrideCommandOptions } from '../shared'
export class OverviewsCommand extends AbstractCommand {
getVideos (options: OverrideCommandOptions & {
page: number
}) {
const { page } = options
2021-07-06 08:30:20 -04:00
const path = '/api/v1/overviews/videos'
const query = { page }
return this.getRequestBody<VideosOverview>({
...options,
path,
query,
implicitToken: false,
2021-07-06 08:30:20 -04:00
defaultExpectedStatus: HttpStatusCode.OK_200
})
}
}