views:

40

answers:

2

I'm writing a small web app for myself in Rails and I want it to use Last.fm's API. I'm incredibly new to web development in general, so I'm not sure where to even begin.

http://www.last.fm/api/rest

I'm not asking for a step-by-step tutorial or anything like that, but a nudge in the right direction would be awesome. Or even just a little example code.

+1  A: 

Dupe of this 748614

Simply speaking - use the HTTParty gem, it does literally everything for you.

aronchick
Seems to be exactly what I needed. Thanks.
Carlo
A: 

Installing HTTParty will get you started, you might also want to make some calls to the API from the command line using cURL just to understand how it works. Just type cURL and the restful URL on the commandline:

prompt> curl http://www.whatever.com/resource for a get

prompt> curl -d '{ "arg" : "value" }' http://www.whatever.com/ for posts etc.

Often understanding what comes back in each of the calls will help you structure your app. Have fun.

steve