SearchClient class

YouTube search queries.

Constructors

SearchClient(YoutubeHttpClient _httpClient)
Initializes an instance of SearchClient

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String searchQuery, {SearchFilter filter = const SearchFilter('')}) Future<VideoSearchList>
Enumerates results returned by the specified search query. The contents are sent in batch of 20 elements. The list can either contain a SearchVideo, SearchPlaylist or a SearchChannel. You SearchList.nextPage to get the next batch of content. Same as SearchClient.search
getQuerySuggestions(String query) Future<List<String>>
Returns the suggestions youtube provide while search on the page.
getVideos(String searchQuery, {SearchFilter filter = TypeFilters.video}) Future<VideoSearchList>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryFromPage(String searchQuery, {SearchFilter filter = const SearchFilter('')}) Future<SearchQuery>
Enumerates videos returned by the specified search query (from the video search page). The videos are sent in batch of 20 videos. You VideoSearchList.nextPage to get the next batch of videos.
searchContent(String searchQuery, {SearchFilter filter = const SearchFilter('')}) Future<SearchList>
Enumerates results returned by the specified search query. The contents are sent in batch of 20 elements. The list can either contain a SearchVideo, SearchPlaylist or a SearchChannel. You SearchList.nextPage to get the next batch of content.
searchRaw(String searchQuery, {SearchFilter filter = const SearchFilter('')}) Future<SearchQuery>
Queries to YouTube to get the results. You need to manually read SearchQuery.content and/or SearchQuery.relatedVideos. For most cases SearchClient.search is enough.
toString() String
A string representation of this object.
inherited

Operators

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