public static void ParseArtist(FanArt fanArt) { try { Uri strUrl = new Uri(string.Format(@"http://api.fanart.tv/webservice/artist/{0}/{1}/{2}/{3}/{4}/{5}/", key, fanArt.ArtistId, "JSON", "all", 1, 1)); string results = Util.GetRest(strUrl); if (string.IsNullOrWhiteSpace(results) == false) { JObject restResponse = JObject.Parse(results); FanArt.ArtistToObject(restResponse, fanArt); } } catch (Exception ex) { Util.LogException(ex); } }
public static FanArt ParseArtist(string id, string albumId) { FanArt fanArt = null; try { Uri strUrl = new Uri(string.Format(@"http://api.fanart.tv/webservice/artist/{0}/{1}/{2}/{3}/{4}/{5}/", key, id, "JSON", "all", 1, 1)); string results = Util.GetRest(strUrl); if (string.IsNullOrWhiteSpace(results) == false) { JObject restResponse = JObject.Parse(results); fanArt = FanArt.ArtistToObject(restResponse, albumId); } return(fanArt); } catch (Exception ex) { Util.LogException(ex, id); return(null); } }