Forum » Development Discussion

Last.fm Web Services for .NET

 
  • Last.fm Web Services for .NET

    I'm just putting together a set of classes to interface with the Last.fm/AudiosScrobbler XML APIs, all from managed .NET.

    It goes something like this:

    Private ScrobblerData As New LastFM.WebServices.WebServiceProxy()

    Private Sub GetInfo()
    Dim Req As New LastFM.WebServices.ServiceRequest("/user/fallenangeluk/profile.xml", AddressOf InfoRecieved)
    ScrobblerData.ProcessRequest(Req)
    End Sub

    Private Sub InfoRecieved(ByVal Response As LastFM.WebServices.ServiceResponse)
    MsgBox(Response.ResponseData)
    End Sub

    Although I've only been working on it for about an hour, this is what my LastFM.WebServices.WebServiceProxy does so far:
    • Respects the AS API 'one request a second' rule by queuing requests
    • Process requests and web activity on a seperate thread
    • Interacts with the 'host' application through delegates and callbacks, using common request and response objects
    • Supports different callbacks on a per-request basis
    • Notifies the host application when a new request has been sent to the APIs (via a callback)
    The lists on this forum are really messed up...
    In addition to this simple 'command in, XML out' model, I'm writing a set of objects to interact with the API on a higher level - something along the lines of:

    private User as new LastFMUser("FallenAngelUK")
    ...
    MsgBox(User.RealName)
    for each Track LastFMTrack in User.Top10Tracks
    MsgBox(Track.Artist.Albums.Count)
    Next Tack

    You get the idea...


    Anyway, does anyone want to give me a hand with this? It'd be nice to get a few more .NET developers on board to implement some really cool features - I'm thinking something like LastFM.Scrobble(FileName) or something...

    Anyway, reply here, or email me (fallenangel){at}gmail_dot_com

    As soon as I can find somewhere, I'll post the sourcecode and all the docs I'm writing at this very momoent.

    • C26000 said...
    • User
    • 2 Aug 2007, 08:20
    nice project :) , currently I have other not paid projects so I can't help you with this one, but I wrote some code that talks with the last.fm webservices for the extra stats project, maybe I can provide you some functions or subs. btw I just wrote a function that gets the artist number of listeners, here it is:

    http://www.last.fm/forum/21604/_/310550/1#f4418892

    • said...
    • User
    • 28 Jan 2008, 06:42
    Hi FallenAngelUK,

    Indeed a nice project. I am interested in contributing and building a usable Last.fm web services API for .NET so that I can also use it myself for the iTunes plugin I am making.

    My plan is to use Last.fm Web Services to automatically get Genre tags (user tags) from Last.fm to fill missing Genres if the users asks to. I am sure iTSfv will be a good Tester for the API that is being built.

    Thanks,
    Mannno

    • tburny said...
    • Forum Moderator
    • 21 Feb 2008, 17:17
    Hi!
    I've made my way through porting all requests from the original client. Put a .Net Dll library up on sf.net yesterday.
    Take a look at http://www.lastfm.de/forum/21716/_/380661 for information.

    maybe we can also work together a bit :)

    Combo.fm: Combine your favourite radio stations! | My Blog
    Combo.fm contests! Win 1+3 months subscriber! More...
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
Anonymous users may not post messages. Please log in or create an account to post in the forums.