A mostly fully implemented dart library for calling the api of last.fm
To see a full example, check example.dart
// you should only ask for username and password once
// to start a session, then you only need to store
// the session key
var client = new LastFmApi(apiKey, sharedSecret, userAgent);
UserSession session = await client.loginWithUserNamePassword(username, password);
// cache session.key somehow (e.g. shared_preferences)
// ....
// for all other logins, fetch your session key and initialize
// client like so
var client = new LastFmApi(apiKey, sharedSecret, userAgent);
client.loginWithSessionKey(sessionkey);
// Now you can make requests
LastFmResponse res = await client.artist.getCorrection(artist);
print(res.toPrettyJson());
"*" indicates that it is implemented but not yet tested
Endpoint | Implemented? |
---|---|
album.addTags | ✔️ |
album.getInfo | ✔️ |
album.getTags | ✔️ |
album.removeTag | ✔️ |
album.search | ✔️ |
artist.addTags | ✔️ |
artist.getCorrection | ✔️ |
artist.getInfo | ✔️ |
artist.getSimilar | ✔️ |
artist.getTags | ✔️ |
artist.getTopAlbums | ✔️ |
artist.getTopTags | ✔️ |
artist.getTopTracks | ✔️ |
artist.removeTag | ✔️ |
artist.search | ✔️ |
auth.getMobileSession | ✔️ |
auth.getSession* | ✔️ |
auth.getToken* | ✔️ |
chart.getTopArtists | ✔️ |
chart.getTopTags | ✔️ |
chart.getTopTracks | ✔️ |
geo.getTopArtists* | ✔️ |
geo.getTopTracks* | ✔️ |
library.getArtists | ✔️ |
tag.getInfo | ✔️ |
tag.getSimilar | ❌ |
tag.getTopAlbums | ✔️ |
tag.getTopArtists | ✔️ |
tag.getTopTracks | ✔️ |
tag.getWeeklyChartList | ✔️ |
track.addTags | ✔️ |
track.getCorrection | ✔️ |
track.getInfo | ✔️ |
track.getSimilar | ✔️ |
track.getTags | ✔️ |
track.getTopTags | ✔️ |
track.love | ✔️ |
track.removeTag | ✔️ |
track.scrobble | ❌ |
track.search | ✔️ |
track.unlove | ✔️ |
track.updateNowPlaying | ❌ |
user.getFriends | ✔️ |
user.getInfo | ✔️ |
user.getLovedTracks | ✔️ |
user.getPersonalTags | ✔️ |
user.getRecentTracks | ✔️ |
user.getTopAlbums | ✔️ |
user.getTopArtists | ✔️ |
user.getTopTags | ✔️ |
user.getTopTracks | ✔️ |
user.getWeeklyAlbumChart | ✔️ |
user.getWeeklyArtistChart | ✔️ |
user.getWeeklyChartList | ✔️ |
user.getWeeklyTrackChart | ✔️ |