Exemplo n.º 1
0
        public Artist Artist(string id)
        {
            string link = string.Format("spotify:artist:{0}", id);
            string json = lookup(link, "album");

            if (json == null)
            {
                return(null);
            }
            JsonLookArtist obj = JsonConvert.DeserializeObject <Reply>(json).artist;

            return(obj.ToEntity());
        }
Exemplo n.º 2
0
        public static Artist ToEntity(this JsonLookArtist artist)
        {
            IEnumerable <Album> a = artist.Albuns.Select(x => new Album(x.Album.Name, x.Album.Link));

            return(new Artist(artist.Name, artist.Link, a.ToList()));
        }