From d91ac3d746bac124f3344986ed1f430727055d19 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Sat, 6 Nov 2021 20:10:31 -0400 Subject: Refactor listenbrainz.atd and fix differences with API --- lib/listenbrainz.atd | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lib/listenbrainz.atd') diff --git a/lib/listenbrainz.atd b/lib/listenbrainz.atd index cf4e09a..ede37f5 100644 --- a/lib/listenbrainz.atd +++ b/lib/listenbrainz.atd @@ -1,12 +1,12 @@ type mbid = string -type isrc = string +type isrc = string type unixtime = float type tm = unixtime wrap type additional_info = { ?artist_mbids : mbid list option; - ?release_group_mbid : mbid list option; - ?release_mid : mbid option; + ?release_group_mbid : mbid option; + ?release_mbid : mbid option; ?recording_mbid : mbid option; ?track_mbid : mbid option; ?work_mbids : mbid list option; @@ -41,6 +41,12 @@ type payload_listen = { track_metadata : track_metadata; } +type payload_listens = { + count : int; + user_id : mbid; + listens : payload_listen list; +} + type payload_listen_count = { count : int; } @@ -69,17 +75,13 @@ type get_user_listen_count = { } type get_user_playing_now = { - count : int; - user_id : mbid; - listens : payload_listen list; + payload : payload_listens; } type get_user_similar_to = similar_user type get_user_listens = { - count : int; - user_id : mbid; - listens : payload_listen list; + payload : payload_listens } type get_latest_import = { -- cgit v1.2.3