Last.Fm API

Last.fm has made available their new API two weeks ago — and it’s a big step forward. I did apply for a preview to update my WordPress plugin Last.Fm Records before the API hit the streets, but alas. So the last few evenings I’ve written version 1.4.

Version 1.3 had a really ugly parseHTML function to parse the HTML pages requested on last.fm. Now that the API returns relatively clean XML, the first thing I did was to update the XML parsing to the functionality available in PHP5, which means I no longer support PHP4. All the Amazon and Musicbrainz requests have been replaced by requests to the new API. Great news is that almost all relevant feeds in the new API include urls for cd covers: only user.getWeeklyAlbumChart (cds you listened to last week) is lacking those: why?

Thanks to the new API the plugin is much faster, finds more images than the previous version, and is now in beta. If you want to test drive it, let me know in the comments. I’ll release this new version after testing it thoroughly. I’ll be listening to songs with single quotes and ampersands in the title!

Oh, and yes, the request (by a human being) for a fallback option has been implemented: when the period you set in the options returns not enough cds, the plugin requests more info from longer ago.

This entry was posted in coding. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

12 Comments

  1. Posted July 18, 2008 at 12:45 pm | Permalink

    Hi there,

    I am using you widget for wordpress since quite a while, currently running 1.3.1 and I would be glad to test the new version.
    I am still using WordPress 2.3.2 though. Do I need to upgrade before?

    Cheers,
    Christoph

  2. Posted July 18, 2008 at 1:05 pm | Permalink

    Hi Christoph, the obvious answer would be that it’s always wise to stay updated. To be honest, I don’t know. I haven’t done any upgrading to the overall structure of the plugin since 2.3, but how this works out in your case?

    As I wrote earlier, you need PHP5. And if you have uploaded missing cover images yourself (on the options page of the plugin) they will not be shown in the current test version. Before I release the plugin I wil add a function to convert the images to the new caching system.

  3. Posted July 19, 2008 at 9:58 am | Permalink

    Hello.

    I’ve used your Last.Fm Records for a long time.
    I wanna try 1.4.

    My Website is brand-new WordPress 2.6.

  4. Posted July 19, 2008 at 10:14 pm | Permalink

    Hi Dai, I’ll mail it to you. Thanks for the offer to help me out!

  5. Posted July 20, 2008 at 10:15 am | Permalink

    I would love to test out the new version, I have been a long time user for this plugin, and I would really like the chance to give 1.4 a shot.

  6. Posted July 20, 2008 at 5:35 pm | Permalink

    I’m definitely interested in this beta with WP2.6 as well…I’ve been wanting to put covers on my site for a long time!

  7. Posted July 20, 2008 at 11:11 pm | Permalink

    I’m definitely interested in testing the beta.

  8. Posted July 21, 2008 at 3:37 am | Permalink

    Hi Jeroen,

    I’d love to beta test the new last.fm plugin if you are still looking for folks. I just updated to WP 2.6 too.

  9. Posted July 21, 2008 at 2:20 pm | Permalink

    ah! hola, thats the reason. i also upgraded to WP 2.6 and did see the changes on the last.fm site. as a last.fm fan i would be more than happy to test the beta. thanks for the great work with last.fm records!

  10. Posted July 21, 2008 at 11:29 pm | Permalink

    Really nice to see all this interest in the new version. Always wanted to have my own community :-)

    I’ve added my latest remarks about the new version in the comments here.

  11. brue
    Posted July 23, 2008 at 3:27 am | Permalink

    Hi,

    it’s a pity not to support php4, becouse my ISP is still running it and I can’t even test the new plugin… and the old one, does not work :(

    Anyway,
    Good work! :)

  12. Posted October 29, 2008 at 3:04 pm | Permalink

    Great plugin. Looks great!
    One problem I’m having though is that it keeps the most played records overall from before I did a reset on my listening. Is it a bug in the last.fm cache?

One Trackback

  1. By Bookmarks about Api on December 9, 2008 at 3:15 am

    [...] – bookmarked by 4 members originally found by Jaykul on 2008-11-14 Last.Fm Api http://jeroensmeets.net/lastfm-api/ – bookmarked by 3 members originally found by agahran on [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

  • recent beluisterd