Package com.pinapelz

Class Holodex

java.lang.Object
com.pinapelz.Holodex

public class Holodex extends Object
The class for interacting with the Holodex API
  • Constructor Details

    • Holodex

      public Holodex(String apiKey)
      Instantiates a new Holodex with the default base url
      Parameters:
      apiKey - the api key
    • Holodex

      public Holodex(String apiKey, String baseUrl)
      Instantiates a new Holodex with a custom base url
      Parameters:
      apiKey - the api key
      baseUrl - the base url
  • Method Details

    • getLiveAndUpcomingVideos

      public List<SimpleVideo> getLiveAndUpcomingVideos(VideoQueryBuilder queryBuilder) throws HolodexException
      Gets a list of upcoming and/or live SimpleVideos matching the VideoQueryBuilder attributes
      Parameters:
      queryBuilder - the query builder
      Returns:
      A list of upcoming and/or live SimpleVideos
      Throws:
      HolodexException - the holodex exception
    • getVideos

      public List<Video> getVideos(VideoQueryBuilder queryBuilder) throws HolodexException
      Gets a list of videos matching the VideoQueryBuilder attributes
      Parameters:
      queryBuilder - the query builder
      Returns:
      list of videos
      Throws:
      HolodexException - the holodex exception
    • getChannel

      public Channel getChannel(String channelId) throws HolodexException
      Gets information about a channel when given a channel id
      Parameters:
      channelId - the channel id
      Returns:
      the Channel
      Throws:
      HolodexException - the holodex exception
    • getVideosByChannelId

      public List<Video> getVideosByChannelId(VideosByChannelIDQueryBuilder query) throws HolodexException
      Gets a list of Videos matching the VideoByVideoIdQueryBuilder attributes for a specific channel Used for when the channel id is known
      Parameters:
      query - the query
      Returns:
      List of videos matching the query
      Throws:
      HolodexException - the holodex exception
    • getVideosFromChannels

      public List<Video> getVideosFromChannels(String[] channels) throws HolodexException
      Gets upcoming and live videos from an array of channel ids Response will contain videos from all channels together This should be used when there is a set of channels that need to be queried
      Parameters:
      channels - the channel ids to get videos from
      Returns:
      List of live and/or upcoming videos where the channel id is the author
      Throws:
      HolodexException - the holodex exception
    • getVideo

      public Video getVideo(VideoByVideoIdQueryBuilder query) throws HolodexException
      Gets the video matching the VideoByVideoIdQueryBuilder attributes
      Parameters:
      query - the query
      Returns:
      Video matching the query
      Throws:
      HolodexException - holodex exception
    • getChannels

      public List<Channel> getChannels(ChannelQueryBuilder query) throws HolodexException
      Gets a list of channels the match the ChannelQueryBuilder attributes
      Parameters:
      query - the query
      Returns:
      List of channels matching the query
      Throws:
      HolodexException - the holodex exception
    • searchVideo

      public Object searchVideo(VideoSearchQueryBuilder query) throws HolodexException
      Sends a POST request to search for videos matching the VideoSearchQueryBuilder attributes If the query is paginated, the response will be a VideoSearchResult object If the query is not paginated, the response will be a list of SimpleVideo objects
      Parameters:
      query -
      Returns:
      Throws:
      HolodexException
    • searchComment

      public Object searchComment(CommentSearchQueryBuilder query) throws HolodexException
      Sends a POST request to search for comments matching the CommentSearchQueryBuilder attributes If the query is paginated, the response will be a CommentSearchResult object If the query is not paginated, the response will be a list of SimpleCommentVideo objects
      Parameters:
      query -
      Returns:
      Throws:
      HolodexException