Discogs.com API Assembly for .NET Applications v1.0 Build 2876
16 November 2007Hello Everyone!
I’m very pleased to bring you the latest build of the Discogs.com API Assembly
This version bring more error handling reguarding the Cover Art routines as well as the ability to now specify your own Discogs.com API key
This is not a REQUIRED field, and if you do not specify an API Key value it will default to the API key I’ve already registered for the Assembly. I figured this would be the easiest way for people to use it.
Some have expressed their concern on the daily usage limits that are imposed. To clarify these limits, as stated on the API information page, the daily limits are 5,000 requests per day, PER IP. This means each person using the API Key can use it up to 5,000 times per day. So no worries on gobbling up all available tries!
If you still want to register for your own API Key, you can do so here!
So, to recap the changes in this version:
- Better Error Handling in GetCoverArt() method
- Will return a blank 1×1 Bitmap if an Exception is thrown.
- Better Error Handling in SaveCoverArt() method
- Will return FALSE if an Exception is thrown while trying to save the file
- Able to now specify your own API Key (API_KEY). If you do not specify one, it will use a default API Key (which works just fine!)
Cheers!
Discogs.com API Assembly for .NET Applications v1.0 Build 2876 - Download (9k)
13 Responses to “Discogs.com API Assembly for .NET Applications v1.0 Build 2876”
November 29th, 2007 at 7:57 am
Hello !
First of all, thank you for your API.
I’ve just needed this for my new application. 
After some tests with your Example program, I success to retrieve data for the “Artist” and “General Search” Radio button.
For the “Label” radio button option I’ve an error on this line number 52:
textBox1.Text = “Label Name: ” oResp.label.name “\r\n”;
==> System.NullReferenceException was unhandled
Message=”La référence d’objet n’est pas définie à une instance d’un objet.”
Source=”DiscogsAPI_Example”
StackTrace:
à DiscogsAPI_Example.Form1.button1_Click(Object sender, EventArgs e) dans C:\Documents and Settings\DarkDream\Mes documents\Visual Studio 2008\Projects\DiscogsAPI_Example\Form1.cs:ligne 52
à System.Windows.Forms.Control.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ButtonBase.WndProc(Message& m)
à System.Windows.Forms.Button.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
à DiscogsAPI_Example.Program.Main() dans C:\Documents and Settings\DarkDream\Mes documents\Visual Studio 2008\Projects\DiscogsAPI_Example\Program.cs:ligne 17
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:
==========================================
And at the 70 line number for the “Release” Radio button:
textBox1.Text = “Label Name: ” oResp.label.name “\r\n”;
==> System.NullReferenceException was unhandled
Message=”La référence d’objet n’est pas définie à une instance d’un objet.”
Source=”DiscogsAPI_Example”
StackTrace:
à DiscogsAPI_Example.Form1.button1_Click(Object sender, EventArgs e) dans C:\Documents and Settings\DarkDream\Mes documents\Visual Studio 2008\Projects\DiscogsAPI_Example\Form1.cs:ligne 70
à System.Windows.Forms.Control.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ButtonBase.WndProc(Message& m)
à System.Windows.Forms.Button.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
à DiscogsAPI_Example.Program.Main() dans C:\Documents and Settings\DarkDream\Mes documents\Visual Studio 2008\Projects\DiscogsAPI_Example\Program.cs:ligne 17
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:”
==========================================
Your application has been compiled on visual studio 2008.
I hope it will help you.
Best Regards
Djoni
November 30th, 2007 at 2:24 pm
Hello
I’ve found a little bug that comes from the encoding. In some countries we use some specials characters like “éèà…..”. Those characters are replaced by this character “?”.
Examples: perform a search for those artists: “Céline Dion” or “Alizée”. You will be able to reproduce it.
Regards and again thank you for your API
Djoni
December 1st, 2007 at 8:23 am
Hi,
I’ve understood my mistake about my first post: sorry.
Strangely, some lables aren’t found. Example Puzzlings Rec., E2UK, Universal, etc. There isn’t a 404 page on the Discogs website.
I hope that my posts don’t annoy u
Djoni
December 3rd, 2007 at 2:40 am
Hi.
Why don’t you want to share source code?
December 3rd, 2007 at 6:44 am
Re: Andrey
A fair question.
I’ve been asked to share the source code for my applications a few times over the years. I have a couple of thoughts on the topic.
The first is that although I appreciate people’s interest in my projects, I don’t feel that I’m obligated to release the source code to -everything- I create as a software developer. It seems the OSS community has changed the perception of software and gave the consumers of software a sense of entitlement to the source code of any application.
This isn’t to say that I’m trying to KEEP my source code from those who want it. To the contrary. I do not use any obfuscating programs (such as DOTfuscator), nor do I try to cripple the program by making it shareware and asking people to pay for it. If someone honestly only wanted to see how my programs work, they could use a simple .NET Reflector (like the fine one by Lutz Roeder)
So, I guess it boils down to this. Although I don’t release the source code for my programs, I do offer them for free. I feel that’s a fair compromise.
December 3rd, 2007 at 6:46 am
Re: Djoni
Currently the Discogs API doesn’t support international characters in the URI. I’m working on a new version that will support International Characters and hopefully help ease some of the issues you’re having in your development.
Look for it in the next week or two.
January 16th, 2008 at 7:37 am
I have a .NET question. What do I need to have on my machine to register the API? How did you register the API to get c# to access the API?
January 21st, 2008 at 9:07 pm
You can add it to a C# project by adding a reference to the assembly using the Project -> Add Reference option in the menu bar of Visual Studio.
Once you’ve made reference to the project, you’ll be able to access it’s name space.
May 6th, 2008 at 2:51 am
Hi Eric,
I’ve been using your Discogs API assembly for about a week now and it’s really helping me to write my application. I’m not too clued up on parsing raw XML so it’s great to have all the data in an object model.
I have noticed one small limitation in your object model that I would like to draw your attention to…
Imagine there is an album that is a compilation of tracks by various artists. The album artist would be ‘Various’. Each of the tracks would have a Title and an Artist - both these fields are available in the raw XML. However, your assembly only makes the track Title available, and not the Artist that made that track.
Could you make this info available? Something like:
DiscogsAPI.Discogs.SearchRelease(id).release.tracklist[0].artist
I hope you can add this. In the meantime, I might just have to get my hands dirty with some XML!
August 5th, 2008 at 4:44 am
Hi Eric,
wicked tool!! I wanted to do s.th. like that on my own and since it is my first experience with C# I needed a hint. While searching for a hint,I found your solution. Really good.
But since there has been no new version for a while now, I think you do not work on it anymore. Is there a chance to a) get the sources or b) get a new version with the feature requested by Disco Patrick (the post before this)?
I hope one of these is possible. As I said this is my first experience in C#, but I am a good software developer, so I could try to implement the new feature if you do not have the time to do so.
Hope to hear from you soon,
Marcus
November 3rd, 2008 at 7:12 am
Hi Eric,
the Download is not available anymore. Will you put it online again?
Thanks for your effort!
Michael
November 6th, 2008 at 9:37 am
Done!
Sorry about the link not working. I recently moved hosts and had to pick and choose which files got moved over
Cheers!
November 27th, 2008 at 1:38 am
thanks for sharing your api!
but is there a newer version available?
I need to get just the links (not the image) for the coverart.