]>
Commit | Line | Data |
---|---|---|
1 | import { HttpStatusCode } from '@shared/core-utils' | |
2 | import { VideosOverview } from '@shared/models' | |
3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | |
4 | ||
5 | export class OverviewsCommand extends AbstractCommand { | |
6 | ||
7 | getVideos (options: OverrideCommandOptions & { | |
8 | page: number | |
9 | }) { | |
10 | const { page } = options | |
11 | const path = '/api/v1/overviews/videos' | |
12 | ||
13 | const query = { page } | |
14 | ||
15 | return this.getRequestBody<VideosOverview>({ | |
16 | ...options, | |
17 | ||
18 | path, | |
19 | query, | |
20 | implicitToken: false, | |
21 | defaultExpectedStatus: HttpStatusCode.OK_200 | |
22 | }) | |
23 | } | |
24 | } |