HolodexClient class

A client for the Holodex API.

Constructors

HolodexClient({required String apiKey, String basePath = 'https://holodex.net/api/v2', Client? client})
Creates a new instance of HolodexClient

Properties

apiKey String
Your API key
final
basePath String
Base API URL
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the client and cleans up any resources associated with it.
get({String path = '', Map<String, String>? headers, Map<String, dynamic>? params}) Future<Response>
Utility method to make a custom http get call with the Api Key added to the headers
getChannelById(String channelId) Future<Channel>
Get a channel by its ID
getChannelRelatedVideos(String channelId, {required VideoSearchType type, ChannelVideoFilter filter = const ChannelVideoFilter()}) Future<PaginatedVideos>
Get Videos Related To Channel
getChannels([ChannelFilter filter = const ChannelFilter(limit: 25, offset: 0, order: Order.ascending, sort: [ChannelSort.organization])]) Future<List<Channel>>
Get channels
getChannelVideos(String channelId, {ChannelVideoFilter filter = const ChannelVideoFilter(includes: [], languages: [], limit: 25, offset: 0, paginated: true)}) Future<PaginatedVideos>
Get Videos From Channel, alias of getChannelRelatedVideos
getEndpoint(HolodexEndpoint endpoint, {Map<String, String>? headers, Map<String, dynamic>? params}) Future<Response>
Utility method to make a custom http get call with the Api Key added to the headers
getLiveVideos([VideoFilter filter = const VideoFilter(includes: [Includes.liveInfo], limit: 50, maxUpcomingHours: 48, offset: 0, order: Order.ascending, sort: [VideoSort.availableAt], status: [VideoStatus.live, VideoStatus.upcoming], type: VideoType.stream, paginated: false)]) Future<PaginatedVideos>
Get a list of live streams
getLiveVideosFromChannelsQuickly(List<String> channelIds) Future<List<Video>>
Quickly Access Live / Upcoming for a set of Channels
getVideoById(String videoId, {List<Includes> includes = const []}) Future<VideoFull>
Get a video by its video ID, alias of getVideos
getVideoMetadata(String videoId, {bool includeTimestampComments = false, List<Language> filterRecommendationLanguages = const []}) Future<VideoFull>
Retrieves a video, optionally with comments and recommended videos
getVideos([VideoFilter filter = const VideoFilter(limit: 25, offset: 0, order: Order.descending, sort: [VideoSort.availableAt], paginated: false)]) Future<PaginatedVideos>
Get a list of videos
getVTuberClips(String channelId, {ChannelVideoFilter filter = const ChannelVideoFilter(includes: [], languages: [], limit: 25, offset: 0, paginated: true)}) Future<PaginatedVideos>
Get Clips of a VTuber, alias of getChannelRelatedVideos
getVTuberCollabs(String channelId, {ChannelVideoFilter filter = const ChannelVideoFilter(includes: [], languages: [], limit: 25, offset: 0, paginated: true)}) Future<PaginatedVideos>
Get Collabs that mention a VTuber, alias of getChannelRelatedVideos
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post({String path = '', Map<String, String>? headers, Map<String, dynamic>? params, Map<String, dynamic>? data}) Future<Response>
Utility method to make a custom http post call with the Api Key added to the headers
postEndpoint(HolodexEndpoint endpoint, {Map<String, String>? headers, Map<String, dynamic>? params, Map<String, dynamic>? data}) Future<Response>
Utility method to make a custom http get call with the Api Key added to the headers
searchComments({required String comment, SearchFilter filter = const SearchFilter(sort: SearchSort.newest, paginated: true, offset: 0, limit: 25)}) Future<PaginatedVideos>
Flexible endpoint to search for comments in videos fulfilling multiple conditions. Descriptions with "any" implies an OR condition, and "all" implies an AND condition.
searchVideos({List<String> conditions = const [], SearchFilter filter = const SearchFilter(sort: SearchSort.newest, paginated: true, offset: 0, limit: 25)}) Future<PaginatedVideos>
Flexible endpoint to search for videos fulfilling multiple conditions. Descriptions with "any" implies an OR condition, and "all" implies an AND condition.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited