Ejemplo n.º 1
0
        public SpotifyPlaylistResponse GetPlaylistByGenre(EnumSpotifyGenres genre)
        {
            var relativeUrl = string.Format(CultureInfo.InvariantCulture, "browse/categories/{0}/playlists", genre.ToString().ToLower());

            var obj = GetData(relativeUrl, parametersByGenrer);

            return(obj);
        }
        public IList <SpotifyTrackItem> GetTrackByGenre(EnumSpotifyGenres genre)
        {
            var playlistResponse = _spotifyPlaylistDataExtratorStrategy.GetPlaylistByGenre(genre)?.Playlist.PlaylistItens.FirstOrDefault();

            if (playlistResponse == null)
            {
                return(null);
            }

            var relativeUrl = string.Format(CultureInfo.InvariantCulture, "playlists/{0}/tracks", playlistResponse.IdPlaylist);

            var obj = GetData(relativeUrl, string.Empty);

            return(obj?.Tracks);
        }