APIs: REST, XML, JSON - HELP!

heebiejeebieclu's picture

They have: 527 posts

Joined: Aug 2004

I want to try to get into working with the various APIs offered by sites such as Flickr and Last.fm. However, I have no idea how to get started. For example, which language do I use? I know one can use jQuery, for example, but is this the easiest?

For example, I want to display my top artists using Last.Fm on my website. Using the easiest method possible!

Does anyone know of any tutorials which could get me started, please?

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Which language you choose will depend on what you’re exactly trying to do and which languages you are most comfortable with.

For just displaying a feed from Flickr or last.fm Javascript is a good choice. jQuery certainly is easy, once you get the hang of it, it's probably quite confusing for newcomers though.

To get started you should probably just stick to whatever examples Flickr and Last.fm provide for Javascript. If you do want to delve into jQuery, this example of a jQuery Last.fm plugin looks like a good place to start.

Looking at the official Last.fm API documentation, it leaves a lot to be desired, external downloads for Javascript and no examples. Not a good place to start learning. Sad

Flickr’s API documentation is similar. Although, Flickr does have an area for apps, maybe one of those can be embedded simply into your site, using Javascript?

Anyway, to start with, use Javascript. jQuery is cool, but strictly optional. Secondly, I advise you to try finding some code examples on the ‘net.

Report back if you find anything interesting. Smiling

a Padded Cell our articles site!

heebiejeebieclu's picture

They have: 527 posts

Joined: Aug 2004

I've discovered this php api and it looks simple, but how would I get started? For instance, getting a user's most played albums? That jQuery plugin looks good, too, will be looking into it. Thanks Smiling
EDIT:I also managed to get some php $doc->load and $itemRSS goodness working, but would like to know a bit more about the above api....

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.