Fix R128 and remaining ID fields to accept both JSON types
- Track.R128 and TrackShort.R128: float64 → JSONR128 (accepts both JSON number and object) - All remaining primary ID fields: string → JSONID (accepts both JSON string and number) Fixed in: account, artist, clip, concert, feed, label, landing, metatag, music_history, pin, queue, radio, search, settings, supplement
This commit is contained in:
1 parent
d0173f795d
commit
dbb823ade3
18 files changed
+75
-44
No files matched your search
@@ -8,7 +8,7 @@ import (
|
||||
// Artist represents a full artist from the Yandex Music API.
|
||||
type Artist struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CoverURI string `json:"cover_uri"`
|
||||
Genres []string `json:"genres"`
|
||||
@@ -210,7 +210,7 @@ type ArtistDonations struct {
|
||||
|
||||
// DonationItem represents a donation item.
|
||||
type DonationItem struct {
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Amount int `json:"amount"`
|
||||
@@ -222,7 +222,7 @@ type DonationItem struct {
|
||||
// ConcertShort represents a concert (minimal for artist).
|
||||
type ConcertShort struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Date string `json:"date"`
|
||||
Venue string `json:"venue"`
|
||||
@@ -298,7 +298,7 @@ func (c *ConcertShort) DeList(data []byte, client ClientInterface) ([]Model, err
|
||||
// ClipShort represents a clip (minimal for artist).
|
||||
type ClipShort struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Duration int `json:"duration"`
|
||||
CoverURI string `json:"cover_uri"`
|
||||
|
||||
Reference in new issue
Block a user