mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-07 00:47:04 +02:00
Spotify: Implemented API request and tests for user tracks
This commit is contained in:
parent
d0739aad0f
commit
ed9debc127
4 changed files with 623 additions and 9 deletions
|
@ -23,12 +23,18 @@ THE SOFTWARE.
|
|||
package spotify
|
||||
|
||||
type TracksResult struct {
|
||||
Href string `json:"href"`
|
||||
Limit int `json:"limit"`
|
||||
Next string `json:"next"`
|
||||
Previous string `json:"previous"`
|
||||
Offset int `json:"offset"`
|
||||
Total int `json:"total"`
|
||||
Href string `json:"href"`
|
||||
Limit int `json:"limit"`
|
||||
Next string `json:"next"`
|
||||
Previous string `json:"previous"`
|
||||
Offset int `json:"offset"`
|
||||
Total int `json:"total"`
|
||||
Items []SavedTrack `json:"items"`
|
||||
}
|
||||
|
||||
type SavedTrack struct {
|
||||
AddedAt string `json:"added_at"`
|
||||
Track Track `json:"track"`
|
||||
}
|
||||
|
||||
type RecentlyPlayedResult struct {
|
||||
|
@ -45,8 +51,8 @@ type Cursors struct {
|
|||
}
|
||||
|
||||
type Listen struct {
|
||||
Track Track `json:"track"`
|
||||
PlayedAt string `json:"played_at"`
|
||||
Track Track `json:"track"`
|
||||
}
|
||||
|
||||
type Track struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue