From 796bff1c6c7108580eae36cf0fbeecc18bccfe20 Mon Sep 17 00:00:00 2001 From: alazyreader Date: Sun, 13 Mar 2022 21:13:19 +0000 Subject: [PATCH] properly parse notes array on folder collections (#1) Co-authored-by: David Ashby Reviewed-on: https://git.yetaga.in/alazyreader/go-discogs/pulls/1 --- user_collection.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/user_collection.go b/user_collection.go index 169068a..05551e9 100644 --- a/user_collection.go +++ b/user_collection.go @@ -67,7 +67,7 @@ type CollectionItemSource struct { DateAdded string `json:"date_added"` FolderID int `json:"folder_id,omitempty"` InstanceID int `json:"instance_id"` - Notes string `json:"notes,omitempty"` + Notes []Note `json:"notes,omitempty"` Rating int `json:"rating"` } @@ -88,6 +88,12 @@ type BasicInformation struct { Year int `json:"year"` } +// Note ... +type Note struct { + ID int `json:"field_id"` + Value string `json:"value"` +} + // CollectionItems list of items in a user’s collection type CollectionItems struct { Pagination Page `json:"pagination"`