Beispiel #1
0
        public bool GetArtist(string artistId)
        {
            var artist = _artistsUtils.GetParticularArtist(artistId);

            var artistMenu = new BasicModelMenu();

            artistMenu.AddItem($"Related Artists", GetRelatedArtists, "1", artistId);
            artistMenu.AddItem($"Artist's Top Tracks", GetArtistTopTracks, "2", artistId);
            artistMenu.AddItem($"Artist's Albums", GetArtistsAlbums, "3", artistId);
            artistMenu.AddItem($"Follow Artist", FollowArtist, "4", artistId);
            artistMenu.AddItem($"UnfollowArtist", UnfollowArtist, "5", artistId);
            artistMenu.AddItem($"Exit", _exitFunctions.Exit, "6", null);
            bool running = true;

            while (running)
            {
                IO.WriteLine(
                    $"Artist: {artist.Name}\nFollowers: {artist.Followers.Total}\nPopularity: {artist.Popularity}");
                running = artistMenu.Display();
            }

            return(true);
        }
Beispiel #2
0
        public void GetParticularArtist_ReturnsArtist()
        {
            var artist = _artistsUtils.GetParticularArtist("1VPmR4DJC1PlOtd0IADAO0");

            Assert.AreEqual(false, artist.HasError());
        }