예제 #1
0
        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());
                }
            }
        }
예제 #2
0
        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());
                }
            }
        }