Archive for category Discogs API

Discogs.com API Assembly for .NET Applications v1.0 Build 2876

Hello 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 2876Download (9k)

16 Comments

Discogs.com API Assembly for .NET Applications v1.0 Build 2871

Greetings Everyone!

I’ve been working on the Discogs.com API Assembly for .NET Applications now for a couple days and have been able to make some progress. It’s now a bit more stable as well a a tiny bit easier to use.

I took some time and added a DEBUG class. This class allows you to find out what’s happening within the Discogs.com Assembly if you start to have issues! :) This new class has two properties:

  • Verbose (bool) – If set to TRUE, Verbose logging will be enabled allowing you to get more precise detail on what is going on within the Assembly. Otherwise, only exceptions will be logged.
  • Log (string) – This is a string containing the current debug log.

Also, it has one Method:

  • LogEvent (string sEvent) – Logs the value passed in to the debug log. This way you can use the same debug log from your own applications :) Should help make things a little easier.

New in this version as well is better error handling in the event of 404′s or an Artist/Release isn’t found. Before if you requested something that didn’t exist, the Assembly kinda crapped out while trying to deserialize the (non-existent) XML :) This has all been fixed.

I’m also including a small example program (with source code) on how to use the Discogs.com API Assembly. I’ve coded the example in C#, so sorry to all those VB.NET developers out there! :) If one of you guys would like to translate it to VB.NET, I’d be more than happy to post it here as well.

If you do not already have Microsoft Visual Studio installed, no worries! Microsoft provides a free version for C# development called Visual C# Express and you can get it here over at Microsoft.com. :)

You will need to update the Reference to the Discogs.com API Assembly. It currently points to where I had it setup on my local machine. :)
Any and all feedback is appreciated!

Cheers!

Discogs.com API Assembly for .NET Applications v1.0 Build 2871Download (9k)

Discogs.com API Assembly Example Application (with Source)Download (10k)

, , , , , ,

1 Comment

Discogs.com API Assembly for .NET Applications v1.0 Build 2867

Hey Everyone!

I’ve been putting some time into my Discogs API Assembly hoping to implement all the functions supported by the API. This build should give access to all available API functions:

  • Get Release Information – SearchRelease(string sRelease)
  • Get Artist Information – SearchArtist(string sArtistName)
  • Get Label Information – SearchLabel(string sLabel)
  • General Search – Search(string sSearchTerm)

I’ve changed the method signatures for the Cover Art downloading routines. I’ve now split this into two new methods:

  • GetCoverArt – This method returns the cover art image that’s downloaded from Discogs.com as a bitmap
  • SaveCoverArt – This method will save the cover art image that’s downloaded from Discogocs.com to the specified file and folder

This way it will be easier to anyone to display the cover art image easily within their application (perhaps a preview window?) without actually having to save anything to the disk.

I don’t suspect the method signatures will be changed much from this version, as these are the only functions provided in the API currently. I still need to work on the error handling within the Assembly itself, such as 404 error handling and also any errors in deserialization. I might make a toggle which will enable verbose debug output from the assembly to a file you specify. This would help developers work with me in fixing any issues that might come up, as well as helping them trouble shoot their own application.

I’m still working on my Simple MP3 Renaming application written in C# using this Assembly. It’s hard to spit my time between the two, but it’s been my test harness for this. I’m going to be releasing the source code under the GPL v2 license.

Cheers!

Discogs.com API Assembly for .NET Applications v1.0 Build 2867Download (8.9k)

No Comments

Discogs.com API Assembly for .NET Applications v1.0 Build 2863

Well, here it is! The Discogs.com API Interface Assembly for .NET Applications.

After fiddling around with the Discogs.com website I decided to take a look at their developers API. It was actually pretty slick, as it lets you look up an Artist and retrieve all of their information including album information on every album they’ve been associated with (including soundtracks). I thought this information might be handy for other people so I wrote a quick Assembly in C# that lets people run queries against the Discogs API easily!

This Assembly provides only three methods currently:

  • SearchArtist (string sArtistName)
    • This method will search the Discogs Library based on the Artist Name specified and return a complex type containing the API response.
  • SearchRelease (string sReleaseName)
    • This method will search the Discogs Library based on the Release Name specified and return a complex type containing the API response.
  • DownloadCoverArt(string sFileName, string sURL)
    • This method allows you to download the cover art from the Discogs Library using the Cover Art URL contained in the Release API response.

I’ve also included a Version property so you can bind your own application to a specific version of the Assembly, in case there’s any version incompatibility moving forward.

The assembly currently already has a Discogs.com API key hard coded in. So no need to sign up for your own API key.

Also, it seems that the API is constantly changing so if for whatever reason one day you stop receiving information from the API, please let me know. Any changes to their XML response might cause the assembly stop responding with information.

My hopes is that people will put this Assembly to good use in their own Media applications. My plan is to release an Open Source MP3 renaming application written in C#. Keep your eyes peeled for that in the coming weeks.

Share and enjoy!

Discogs.com API Assembly for .NET Applications v1.0 Build 2863Download (6.8k)

2 Comments