YTMusic class
Constructors
- YTMusic()
-
factory
Properties
Methods
-
constructRequest(
String endpoint, {Map< String, dynamic> body = const {}, Map<String, String> query = const {}}) → Future - Constructs and performs an API request to the specified endpoint with optional body and query parameters.
-
fetchConfig(
) → Future< void> - Fetches the configuration data required for API requests.
-
getAlbum(
String albumId) → Future< AlbumFull> - Retrieves detailed information about an album given its album ID.
-
getArtist(
String artistId) → Future< ArtistFull> - Retrieves detailed information about an artist given its artist ID.
-
getArtistAlbums(
String artistId) → Future< List< AlbumDetailed> > - Retrieves a list of albums by a specific artist given the artist's ID.
-
getArtistSingles(
String artistId) → Future< List< AlbumDetailed> > -
getArtistSongs(
String artistId) → Future< List< SongDetailed> > - Retrieves a list of songs by a specific artist given the artist's ID.
-
getHomeSections(
) → Future< List< HomeSection> > - Retrieves the home sections of the music platform.
-
getLyrics(
String videoId) → Future< String?> - Retrieves the lyrics of a song given its video ID.
-
getPlaylist(
String playlistId) → Future< PlaylistFull> - Retrieves detailed information about a playlist given its playlist ID.
-
getPlaylistVideos(
String playlistId) → Future< List< VideoDetailed> > - Retrieves a list of videos from a playlist given its playlist ID.
-
getSearchSuggestions(
String query) → Future< List< String> > - Retrieves search suggestions for a given query.
-
getSong(
String videoId) → Future< SongFull> - Retrieves detailed information about a song given its video ID.
-
getVideo(
String videoId) → Future< VideoFull> - Retrieves detailed information about a video given its video ID.
-
initialize(
{String? cookies, String? gl, String? hl}) → Future< YTMusic> - Initializes the YTMusic instance with provided cookies, geolocation, and language.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
search(
String query) → Future< List< SearchResult> > - Performs a search for music with the given query and returns a list of search results.
-
searchAlbums(
String query) → Future< List< AlbumDetailed> > - Performs a search specifically for albums with the given query and returns a list of album details.
-
searchArtists(
String query) → Future< List< ArtistDetailed> > - Performs a search specifically for artists with the given query and returns a list of artist details.
-
searchPlaylists(
String query) → Future< List< PlaylistDetailed> > - Performs a search specifically for playlists with the given query and returns a list of playlist details.
-
searchSongs(
String query) → Future< List< SongDetailed> > - Performs a search specifically for songs with the given query and returns a list of song details.
-
searchVideos(
String query) → Future< List< VideoDetailed> > - Performs a search specifically for videos with the given query and returns a list of video details.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited