Package com.pinapelz
Class Holodex
java.lang.Object
com.pinapelz.Holodex
The class for interacting with the Holodex API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChannel
(String channelId) Gets information about a channel when given a channel idgetChannels
(ChannelQueryBuilder query) Gets a list of channels the match the ChannelQueryBuilder attributesgetLiveAndUpcomingVideos
(VideoQueryBuilder queryBuilder) Gets a list of upcoming and/or live SimpleVideos matching the VideoQueryBuilder attributesGets the video matching the VideoByVideoIdQueryBuilder attributesgetVideos
(VideoQueryBuilder queryBuilder) Gets a list of videos matching the VideoQueryBuilder attributesGets a list of Videos matching the VideoByVideoIdQueryBuilder attributes for a specific channel Used for when the channel id is knowngetVideosFromChannels
(String[] channels) 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 queriedSends 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 objectsSends 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
-
Constructor Details
-
Holodex
Instantiates a new Holodex with the default base url- Parameters:
apiKey
- the api key
-
Holodex
Instantiates a new Holodex with a custom base url- Parameters:
apiKey
- the api keybaseUrl
- 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
Gets a list of videos matching the VideoQueryBuilder attributes- Parameters:
queryBuilder
- the query builder- Returns:
- list of videos
- Throws:
HolodexException
- the holodex exception
-
getChannel
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
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
Gets the video matching the VideoByVideoIdQueryBuilder attributes- Parameters:
query
- the query- Returns:
- Video matching the query
- Throws:
HolodexException
- holodex exception
-
getChannels
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
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
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
-