Using restsharp in c# to consume last.fm services -
i'm trying connect last.fm rest services using restsharp. can deserialize simple data found @ example: http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=cher&api_key=xxxxxxxxxxxxxxxxxxxxxxx
however, when reach images section artist:
<artist> <name>cher</name> <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid> <url>http://www.last.fm/music/cher</url> <image size="small">http://userserve-ak.last.fm/serve/34/48511693.png</image> <image size="medium">http://userserve-ak.last.fm/serve/64/48511693.png</image> <image size="large">http://userserve-ak.last.fm/serve/126/48511693.png</image> <image size="extralarge">http://userserve-ak.last.fm/serve/252/48511693.png</image> <image size="mega">http://userserve-ak.last.fm/serve/500/48511693/cher+tess.png</image>
i struggling library map data. here code have far:
namespace *******.core.lastfm { using system.xml.serialization; using system.collections.generic; using system; public class image { [xmlattribute] public string size { get; set; } public string value { get; set; } } public class artistimagecollection : list<image> { } public class artist { public string name { get; set; } public string mbid { get; set; } public string url { get; set; } [xmlarray] public artistimagecollection image; } }
this doesnt work. know how bind this?
[i updated reflect nics suggestion - doesn't work still]
i got basis code from: http://www.aaronstannard.com/post/2010/06/14/how-to-parse-a-users-delicious-feed-with-restsharp.aspx
w://
there no get/set on image
doh
Comments
Post a Comment