module Audioscrobbler:sig
..end
http://www.audioscrobbler.net/development/protocol/
type
source =
| |
User |
| |
Broadcast |
| |
Recommendation |
| |
Lastfm |
| |
Unknown |
type
rating =
| |
Love |
| |
Ban |
| |
Skip |
type
song = {
|
artist : |
|
track : |
|
time : |
|
source : |
|
rating : |
|
length : |
|
album : |
|
trackauth : |
|
tracknumber : |
|
musicbrainzid : |
type
error =
| |
Http of |
| |
Banned |
| |
Badauth |
| |
Badtime |
| |
Failed of |
| |
UnknownError of |
| |
Success |
| |
Internal of |
exception Error of error
val string_of_error : error -> string
Using this API, all requests are done in one single step
val do_np : Lastfm.client -> Lastfm.login -> song -> unit
do_np client login song
Execute a nowplaying request
with authentificationval do_submit : Lastfm.client -> Lastfm.login -> song list -> unit
do_submit client login song
Execute a nowplaying request
with authentificationThis API is for advanced usages.
You may use it this way:
The module will cache session informations and avoid redundant
requests, so you might always call handshake.
val handshake : Lastfm.client -> Lastfm.login -> string
handshake client login
Open session, returns session IDval np : string -> song -> unit
np sessionID track
Execute a nowplaying requestval submit : string -> song list -> unit
submit sessionID tracks
Execute a submit request