aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/overviews/overviews-command.ts
blob: e15644d9426cb7c5a980f8ef2833fa4067c3a7c3 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                   
      
                            






                                                

            
                           



                                                  
import { HttpStatusCode } from '@shared/core-utils'
import { VideosOverview } from '@shared/models'
import { AbstractCommand, OverrideCommandOptions } from '../shared'

export class OverviewsCommand extends AbstractCommand {

  getVideos (options: OverrideCommandOptions & {
    page: number
  }) {
    const { page } = options
    const path = '/api/v1/overviews/videos'

    const query = { page }

    return this.getRequestBody<VideosOverview>({
      ...options,

      path,
      query,
      implicitToken: false,
      defaultExpectedStatus: HttpStatusCode.OK_200
    })
  }
}