Search

Feedback

web services API to look up songs/artists

schristensen

Member
Posts: 2

schristensen @ 2009-11-24 00:58:50 UTC

All, I am a web developer and all around hacker. I'm interested in writing a plugin for Rhythmbox (http://projects.gnome.org/rhythmbox/) to allow me to query SecondHandSongs' database for the current song I'm listening to and display whither it is a cover or not, and if so display the orginal artist and info, and a link to view more info on the site for that song.


I can do all this with submitting and fetching requests to the site and parsing the HTML returned. But it would be a lot easier if there was a dedicated web services API for such a thing. Like a REST service that I could use to submit queries and get results. I'd be fine with results in XML or JSON, or even HTML or whatever.


If other people like this idea, I could see people writing similar plugins for lots of other mp3/media players. It could help generate a lot more interest in the site.


Does this sound interesting to people? Would you use such a plugin? I would, but maybe that's just me.

Denis

Retired Editor
Posts: 9966

Denis @ 2009-11-24 01:45:48 UTC

We have had API requests before and I agree this would be a major enhancement for SHS, knowing that some users are parsing the HTML pages already to get the data they need (which is really a bad approach and waste of bandwith/resources).

We have a major conceptual change coming up soon, after which we could start implementing some web wervices.


Besides your request (querying for song/artist and returning cover status and orginal info in case of a cover), can you think of other queries that could be useful?

Mathieu

Manager
Posts: 7331

Mathieu @ 2009-11-30 23:52:34 UTC

I've been thinking of redesigning the way the website works, so there would be a central RPC engine that can be used for internal AJAX calls and for external parties. The key strength of the RPC engine is that it doesn't care whether it's called by a GET form, a POST form, an AJAX GET/POST form or as a pure RPC call, and applies error handling accordingly (e.g. normal form must trigger a redirect, AJAX form just returns the error message).


At the moment I have some kind of bastardized JSON-RPC but I could write a layer on top of it to make it adhere to some kind of standard. If you have some preference, let me know. However, I'll probably pass on things like SOAP.


Most important here, is that we make the distinction between 'private' and 'public' functionality, where only 'public' is guaranteed to have some kind of stability. Therefore, it's a good idea that you start documenting the exact functionality you expect. (Adding version information to RPCs might be a good idea to ensure stability)

razudoks

Member
Posts: 1

razudoks @ 2011-04-26 21:40:30 UTC

Has anything changed since 2009? I was looking for some information about Web Services or even Json data sources, but haven't found anything.

Bastien

Manager
Posts: 35913

Bastien @ 2011-04-28 21:07:06 UTC

Mathieu? Denis?

Denis

Retired Editor
Posts: 9966

Denis @ 2011-04-28 21:40:25 UTC

Meanwhile the RPC engine is in place and a basic API is currently being developed by Mathieu.


razudoks, which functionality would you need exactly? Please elaborate.

ildella

Member
Posts: 1

ildella @ 2012-01-11 14:09:18 UTC

Hi. I got in touch with Mathieu in private about this topic but now is better to have the conversation in public.


I am interested in having an access to SHS dataset through an API.

I also recently stumbled upon this:

http://labrosa.ee.columbia.edu/millionsong/secondhand


Mathieu told me one month ago that a new SHS release just made easier the development for an API.

What's the status? There's a way I can help as a developer?


Thanks.

Bastien

Manager
Posts: 35913

Bastien @ 2012-01-11 19:29:12 UTC

Mathieu has been working like hell past weeks on the rewrite, new server, etc... so not sure if he made some progress on this.


Mathieu?

Mathieu

Manager
Posts: 7331

Mathieu @ 2012-08-01 13:28:05 UTC

The API is almost ready! If someone is interested, I'll explain how to use it.


I have contacted all the people in this topic by mail to check if they are still interested.

Last edit: 2012-08-01 13:34:50 UTC by Mathieu