示例#1
0
        public async Task Login()
        {
            await DeezerAPI.Authenticate();

            User user = await DeezerAPI.User();

            Console.WriteLine($"Deezer user: {user.Name}");
        }
示例#2
0
        public static async Task StartPresence()
        {
            while (true)
            {
                Track track = await DeezerAPI.LastTrack();

                if (currentlyPlaying != track.Id)
                {
                    UpdatePresence(track);
                    Console.WriteLine($"Currently playing: {track.Title} by {track.Artist.Name} - {track.Album.Title}");
                    currentlyPlaying = track.Id;
                }
                await Task.Delay(30000);
            }
        }