chill-o-mat over 9 years agoThis post is hidden because you reported it for abuse. Show this postHi guys & gals,
I've written a c# API wrapper with strong type support for the XML responses. Usage is pretty much fast forward:
// instantiate the client
MPW.Discogs.Client client = new MPW.Discogs.Client("<your-API-key>");
// use it:
Artist artist = client.GetArtist(4711);
Release release = client.GetRelease(42);
Label label = client.GetLabel(0815);
Result results = client.Search("Blues Brothers Soul man");
You can grab it here:
Do whatever you want with this, I'd appreciate a note if you like it.
itz over 9 years agoThis post is hidden because you reported it for abuse. Show this postHi,
I tried using your wrapper in a vb.net project and it works fine. Thank you!
Is there a documentation for it?
Or more specific:
client.search(searchtext) returns only 20 results
How can I move to the next results?
And how can I get the number of results?
chill-o-mat over 9 years agoThis post is hidden because you reported it for abuse. Show this postThe number of results should be inside, there is a property NumberOfResults in the SearchResults class. It is fed by the attribute "numResult" of searchresults:
<searchresults start="1" end="20" numResult="150">
Your second question... well, it seems that the Discogs API itself provides no way of moving to the next 20 results. If it is possible, it could by added of course, but this is a limitation of the API, I guess.
By the way, I'll update it in near future - I managed to unwrap the error response from the exception that is thrown when the HTTP status code is != 200. I added a new data type "Fault" that is a representation of an erroneus response (e.g. Status code 400 is returned when the 5000 requests per day and IP are exceeded. In the current version you'll just get an exception saying "400". The next release will give you the message from the API.
itz over 9 years agoThis post is hidden because you reported it for abuse. Show this post itz edited over 9 years agoThe limitation to 20 results seems not to be necessary. If you try
for instance in your browser you earn much more than 20 releases.
Edit: I found this solution: http://www.discogs.com/help/forums/topic/169641
Can you post a short code-snippet for the numResults-property? I can only access the MPW.Discogs.Data.Result and not the MPW.Discogs.Data.SearchResult