This also includes tests against a sample response from the https://monster-siren.hypergryph.com/api/songs endpoint. Signed-off-by: Yonah <contrib@gensokyo.uk>
23 lines
513 B
Go
23 lines
513 B
Go
package monstersirenfetch
|
|
|
|
// Songs is the response of /api/songs.
|
|
type Songs struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data SongData `json:"data"`
|
|
}
|
|
|
|
// SongData represents [Songs.Data].
|
|
type SongData = struct {
|
|
List []Song `json:"list"`
|
|
Autoplay string `json:"autoplay"`
|
|
}
|
|
|
|
// Song represents the metadata of a song.
|
|
type Song struct {
|
|
CID StringInt `json:"cid"`
|
|
Name string `json:"name"`
|
|
AlbumCID StringInt `json:"albumCid"`
|
|
Artists []string `json:"artists"`
|
|
}
|