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)); }
public void GetUserTracksTest() { List <LastFMAPIClient.Track> tracks = LastFMApi.GetUserTracks("eriejar", "Caravan Palace"); Assert.IsNotNull(tracks[0]); }