Пример #1
0
        public JsonResult GetSimilarArtists(string[] artistName)
        {
            if (artistName == null || artistName.Length == 0)
            {
                return(Json(new { error = "Please add artists" }, JsonRequestBehavior.AllowGet));
            }
            LastFMApi lastfm = new LastFMApi();
            var       result = lastfm.GetSimilarArtists(artistName.Select(qq => new Artist {
                Name = qq
            }).ToArray());

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public void GetUserTracksTest()
        {
            List <LastFMAPIClient.Track> tracks = LastFMApi.GetUserTracks("eriejar", "Caravan Palace");

            Assert.IsNotNull(tracks[0]);
        }