TrackMethods class
This contains all the methods about a Track.
Constructors
- TrackMethods(LastFM _api)
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
-
addTags(
{required String track, required String artist, required List< String> tags}) → Future<bool> - Tag a track using a list of user supplied tags.
-
getCorrection(
{required String track, required String artist}) → Future< List< Track> > - Use the last.fm corrections data to check whether the supplied artist has a correction to a canonical artist.
-
getInfo(
{String? track, String? artist, String? mbid, String? username, bool autoCorrect = false}) → Future< Track> - Get the metadata for a track on Last.fm using the artist/track name or a musicbrainz id.
-
getSimilar(
{String? track, String? artist, String? mbid, int? limit, bool autoCorrect = false}) → Future< List< Track> ?> - Get the similar tracks for this track on Last.fm, based on listening data.
-
getTags(
{String? track, String? artist, String? mbid, String? user, bool autoCorrect = false}) → Future< List< Tag> ?> - Get the tags applied by an individual user to a track on Last.fm. To retrieve the list of top tags applied to a track by all users use track.getTopTags.
-
getTopTags(
{String? track, String? artist, String? mbid, bool autoCorrect = false}) → Future< List< Tag> ?> - Get the top tags for this track on Last.fm, ordered by tag count. Supply either track & artist name or mbid.
-
love(
{required String track, required String artist}) → Future< bool> - Love a track for a user profile.
-
multiScrobble(
{required List< Scrobble> scrobbleList}) → Future<ScrobbleResponse> - See TrackMethods.scrobble and Scrobble for more information.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTag(
{required String track, required String artist, required String tag}) → Future< bool> - Remove a user's tag from a track.
-
scrobble(
{required String track, String? album, required String artist, int? trackNumber, Duration? duration, DateTime? timestamp, String? context, String? streamId, bool chosenByUser = false, String? mbid, String? albumArtist}) → Future< ScrobbleResponse> -
Used to add a track-play to a user's profile.
Scrobble a track, or a batch of tracks.
Tracks are passed to the service using array notation for each of the
below params, up to a maximum of 50 scrobbles per batch
0<=i<=49. If you are only sending a single scrobble the array notation may be omitted. -
scrobbleFromObject(
{required Scrobble scrobble}) → Future< ScrobbleResponse> - See TrackMethods.scrobble.
-
search(
{required String track, String? artist, int page = 1, int limit = 30}) → Future< TrackSearchResults> - Search for a track by track name. Returns track matches sorted by relevance.
-
toString(
) → String -
A string representation of this object.
inherited
-
unLove(
{required String track, required String artist}) → Future< bool> - UnLove a track for a user profile.
-
updateNowPlaying(
{required String track, String? album, required String artist, String? albumArtist, int? trackNumber, Duration? duration, DateTime? timestamp, String? context, String? streamId, bool chosenByUser = false, String? mbid}) → Future< NowPlayedTrack> - Used to notify Last.fm that a user has started listening to a track. Parameter names are case sensitive.
-
updateNowPlayingFromObject(
{required NowPlaying track}) → Future< NowPlayedTrack> - See TrackMethods.updateNowPlaying.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited