Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoHandler

Hierarchy

  • VideoHandler

Methods

get

  • get(limit?: number, offset?: number, sort?: string, order?: "asc" | "desc", title?: string, startDate?: string | Date, endDate?: string | Date, status?: "" | "past" | "live" | "upcoming" | "new", isUploaded?: boolean, isCaptioned?: boolean): Promise<VideoData>
  • Returns a list of videos and streams.

    Parameters

    • limit: number = 25

      The number of videos to return

    • offset: number = 0

      The number of videos to skip.

    • sort: string = 'published_at'

      Column name to sort by.

    • order: "asc" | "desc" = 'desc'

      Sort order.

    • title: string = ''

      Video title search query.

    • startDate: string | Date = ''

      Cut off all videos before this date

    • endDate: string | Date = ''

      Cut off all videos after this date

    • status: "" | "past" | "live" | "upcoming" | "new" = ''

      Status of video to fetch.

    • isUploaded: boolean = false

      Return only videos if true, otherwise will also return streams

    • isCaptioned: boolean = false

      Set to true to only get videos with captions

    Returns Promise<VideoData>

getByBilibiliId

  • Get a video by its bilibli id

    Parameters

    • id: string

      bilibili ID of the video.

    Returns Promise<BilibiliVideo>

getById

  • getById(id: number, withComments: boolean): Promise<Video>
  • Get a video by its HoloAPI id

    Parameters

    • id: number

      HoloAPI record ID of the video.

    • withComments: boolean

      Set to true to include comments in the response.

    Returns Promise<Video>

getByYoutubeId

  • getByYoutubeId(id: string, withComments: boolean): Promise<YoutubeVideo>
  • Get a video by its YouTube id

    Parameters

    • id: string

      YouTube ID of the video.

    • withComments: boolean

      Set to true to include comments in the response.

    Returns Promise<YoutubeVideo>

getLivestreams

  • getLivestreams(channelID?: string, maxUpcomingHours?: number, lookbackHours?: number, hideDescription?: boolean): Promise<LivestreamData>
  • Get currently live channels

    Parameters

    • channelID: string = ''

      HoloAPI channel ID or YouTube channel ID.

    • maxUpcomingHours: number = 48

      Restrain how far ahead of now to return scheduled streams. Can be used to prevent getting Free Chat rooms.

    • lookbackHours: number = 0

      How far back to receive recently-ended streams, maximum is 12 hours.

    • hideDescription: boolean = true

      Hide the description key in all channel objects, possible bandwidth saving measure.

    Returns Promise<LivestreamData>

Generated using TypeDoc