I wanted a way to call the last.FM API with little hassle. Any function, any callback, and less I had to deal with AJAX syntax the better. I implemented a calling method to build out a request URL from parameters given, and also set the successfull callback to handle the method.
In this example I'm calling user.getRecentTracks.
This type of request building works for all function calls.
Note: that a "Successful" callback will be hit for both receiving the data you desire as well as an invalid response from the API such as "that method did not exist" or "missing parameters". Trickier to handle, means you either need to ensure your parameters/call works, or handle a scenario of always getting an "error" JSON object from last.fm in a successful callback. An AJAX ERROR callback means you got no response from last.FM, it's different.