private async Task <string> GetRecentTracks() { recentTracks.Clear(); var client = new LastfmClient("f129e1e61eec3e59e1730738845abd1f", null); var response = await client.User.GetRecentScrobbles(username); foreach (IF.Lastfm.Core.Objects.LastTrack i in response) { recentTracks.Add(i); } Console.WriteLine("Artist: " + recentTracks[0].ArtistName); client.Dispose(); return(recentTracks[0].ArtistName); }
private async Task <string> GetRecentTracks() { recentTracks.Clear(); var client = new LastfmClient(Globals.InitVars.apiKey, null); var response = await client.User.GetRecentScrobbles(username); foreach (IF.Lastfm.Core.Objects.LastTrack i in response) { recentTracks.Add(i); } Console.WriteLine("Artist: " + recentTracks[0].ArtistName); client.Dispose(); return(recentTracks[0].ArtistName); }
public void Dispose() { Client?.Dispose(); }
public void Dispose() { client.Dispose(); }
public void DeauthenticateCurrentUser() { // dispose current client _lastFmClient?.Dispose(); _lastFmClient = null; }