public MasterRelease GetMasterRelease(int id) { string response = this.DownloadString(this.baseUrl + "master/" + id); this.UpdateRateLimit(); using (StringReader stringReader = new StringReader(response)) { using (XmlReader xmlReader = XmlReader.Create(stringReader)) { DataReader2 dataReader = new DataReader2(xmlReader); dataReader.ReadResponseHeader(); return(dataReader.ReadMasterRelease()); } } }
public Artist GetArtist(string artistName) { string escapedArtistName = Uri.EscapeDataString(artistName); string response = this.DownloadString(this.baseUrl + "artist/" + escapedArtistName); this.UpdateRateLimit(); using (StringReader stringReader = new StringReader(response)) { using (XmlReader xmlReader = XmlReader.Create(stringReader)) { DataReader2 dataReader = new DataReader2(xmlReader); dataReader.ReadResponseHeader(); return(dataReader.ReadArtist()); } } }