I'm trying to learn how to properly use AJAX and RESTful APIs, and while I get the idea, the actual implementation of things like authenticating is kind of baffling me. What's particularly frustrating is that none of the documentation on sites like Last.FM or TVRage.com actually lay out code examples, which I feel like would help me a ton.
If anyone's used the Last.FM API particularly and could give a quick code example -- for any of their methods -- I'd really appreciate it.
Right now, I'm trying to authenticate myself, according to their instructions.
Construct your api method signatures by first ordering all the parameters sent in your call alphabetically by parameter name and concatenating them into one string using a
<name><value>
scheme.
A <name><value>
scheme? Like, <apikey><keyitself>
? And then what do I do when authenticated, somehow store a session for an hour and then refresh, or authenticate on every call? I just don't get the specifics of how to actually implement it...