Options
All
  • Public
  • Public/Protected
  • All
Menu

Class holodex

A class representing the holodex api

Hierarchy

  • holodex

Index

Constructors

Properties

baseUrl: string
fetch: typeof fetch
headers: {}

Type declaration

    key: string

    Methods

    • getChannel(id: string): Promise<Channel>
    • Get a channel by id

      example
      holodex.getChannel('UCoSrY_IQQVpmIRZ9Xf-y93g').then(channel => {
      console.log(channel.name);
      });

      Parameters

      • id: string

        The id of the channel

      Returns Promise<Channel>

      Promise

    • Get a video by id

      see

      VideoSearchOptions

      example
      holodex.getVideo('5d7f8b8c-b9b1-4b5b-b8e2-f8f8b8b8b8b8', {
      comments: true,
      }).then(video => {
      console.log(video.title);
      });

      Parameters

      Returns Promise<Video>

      Promise

    • Get multiple video from filters

      see

      MultiVideoSearchOptions

      example
      holodex.getVideos({
      type: 'clip',
      topicId: 'minecraft',
      limit: 10,
      }).then(videos => {
      console.log(videos[0].title);
      });

      Parameters

      Returns Promise<any>

      Promise<VideoMin[]>

    • Gets videos with comments

      see

      SearchCommentOptions

      example
      holodex.searchComments({
      type: 'clip',
      topicId: 'minecraft',
      limit: 10,
      }).then(videos => {
      console.log(videos[0].comments);
      });

      Parameters

      Returns Promise<any>

      Promise<VideoMin[]>

    • A improved /videos endpoint

      see

      SearchVideoOptions

      example
      holodex.searchVideos({
      query: 'minecraft',
      limit: 10,
      }).then(videos => {
      console.log(videos[0].title);
      });

      Parameters

      Returns Promise<any>

      Promise<VideoMin[]>

    Generated using TypeDoc