module Radio_generic:
| Parameters: |
|
No protocol documentation avaible for now...
typetrack =(string * string) list * string
A track is a list of "field","value" metadatas and an uri
type error =
| |
Http of |
| |
Auth of |
| |
Adjust of |
| |
Playlist |
| |
Empty |
exception Error of error
val string_of_error : error -> stringval base_host : string Pervasives.refval get : ?timeout:float -> string -> track listget uri performs whole process and
outputs a list of metadatas,uri
from given lastfm uri.
This function cannot handle well multiple anonymous requests.
If you plan to play simultaneously
several anonymous radios, you better
use the advanced API to keep track
of every opened session.
Using this API you shall call:
The module will cache session informations and avoid redundant requests, so you might always call init and adjust.
If you call playlist, and anything went bad,
you have to call clear to remove cached data
about this session.
In any case you may also give another try,
in case of inconsistent cached session data.
See get source for details
val parse : string -> Lastfm_generic.login * string * string optionparse uri parse the given lastfm:// uri
returns login,station,options
val init : ?timeout:float -> Lastfm_generic.login -> stringinit login initiate lastfm session
Returns the session id
val adjust : ?timeout:float -> string -> string -> (string * string) listadjust id station adjusts lastfm station
for given session ID
Returns a list of (variable,value) as returned
by the server. Contains settings for adjusted
radio.
val playlist : ?timeout:float -> string -> string option -> stringplaylist id returns the raw xml content of the playlistval tracks : ?timeout:float ->
string -> string option -> track listtracks id
returns a list of metadatas,urival clear : string -> unitclear id closes and clear all
informations about the given session ID