blob: cf4e09a8d9501bfd553652bdb73e3bc06c0dfe36 (
plain) (
tree)
|
|
type mbid = string <ocaml valid="Listenbrainz_util.validate_mbid">
type isrc = string
type unixtime = float <json repr="int">
type tm = unixtime wrap <ocaml module="Unix" t="Unix.tm" wrap="Unix.gmtime" unwrap="Listenbrainz_util.tm_unwrap">
type additional_info = {
?artist_mbids : mbid list option;
?release_group_mbid : mbid list option;
?release_mid : mbid option;
?recording_mbid : mbid option;
?track_mbid : mbid option;
?work_mbids : mbid list option;
?tracknumber : int option;
?isrc : isrc option;
?spotify_id : string option;
?tags : string list option;
?listening_from : string option;
}
type track_metadata = {
artist_name : string;
track_name : string;
?listened_at : int option;
?additional_info : additional_info option;
?release_name : string option;
}
type listen_type = [
Single <json name="single">
| Playing_now <json name="playing_now">
| Import <json name="import">
]
type similar_user = {
user_name : string;
similarity : float;
}
type payload_listen = {
?listened_at : tm option;
track_metadata : track_metadata;
}
type payload_listen_count = {
count : int;
}
type post_submit_listens = {
listen_type : listen_type;
payload : payload_listen list;
} <ocaml valid="Listenbrainz_util.validate_post_submit_listens">
type get_validate_token = {
code : int;
message : string;
valid : bool;
?user: string option;
} <ocaml valid="Listenbrainz_util.validate_get_validate_token">
type post_delete_listen = {
listened_at : tm;
recording_msid : mbid;
}
type get_user_similar_users = similar_user list
type get_user_listen_count = {
payload : payload_listen_count;
}
type get_user_playing_now = {
count : int;
user_id : mbid;
listens : payload_listen list;
} <ocaml valid="Listenbrainz_util.validate_get_user_playing_now">
type get_user_similar_to = similar_user
type get_user_listens = {
count : int;
user_id : mbid;
listens : payload_listen list;
} <ocaml valid="Listenbrainz_util.validate_get_user_listens">
type get_latest_import = {
musicbrainz_id : mbid;
latest_import : tm;
}
type post_latest_import = {
ts : tm;
}
|