示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public void Dispose()
 {
     Client?.Dispose();
 }
示例#4
0
 public void Dispose()
 {
     client.Dispose();
 }
 public void DeauthenticateCurrentUser()
 {
     // dispose current client
     _lastFmClient?.Dispose();
     _lastFmClient = null;
 }