overviews-command.ts 550 B

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