85 lines
2.4 KiB
Go
85 lines
2.4 KiB
Go
package spotify
|
|
|
|
type SpotifyRefreshResponse struct {
|
|
AccessToken string `json:"access_token"`
|
|
TokenType string `json:"token_type"`
|
|
ExpiresIn int `json:"expires_in"`
|
|
RefreshToken string `json:"refresh_token"`
|
|
Scope string `json:"scope"`
|
|
}
|
|
|
|
type SpotifyItem struct {
|
|
Album struct {
|
|
AlbumType string `json:"album_type"`
|
|
Artists []struct {
|
|
ExternalUrls struct {
|
|
Spotify string `json:"spotify"`
|
|
} `json:"external_urls"`
|
|
Href string `json:"href"`
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
URI string `json:"uri"`
|
|
} `json:"artists"`
|
|
ExternalUrls struct {
|
|
Spotify string `json:"spotify"`
|
|
} `json:"external_urls"`
|
|
Href string `json:"href"`
|
|
ID string `json:"id"`
|
|
Images []struct {
|
|
Height int `json:"height"`
|
|
URL string `json:"url"`
|
|
Width int `json:"width"`
|
|
} `json:"images"`
|
|
Name string `json:"name"`
|
|
ReleaseDate string `json:"release_date"`
|
|
ReleaseDatePrecision string `json:"release_date_precision"`
|
|
TotalTracks int `json:"total_tracks"`
|
|
Type string `json:"type"`
|
|
URI string `json:"uri"`
|
|
} `json:"album"`
|
|
Artists []struct {
|
|
ExternalUrls struct {
|
|
Spotify string `json:"spotify"`
|
|
} `json:"external_urls"`
|
|
Href string `json:"href"`
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
URI string `json:"uri"`
|
|
} `json:"artists"`
|
|
DiscNumber int `json:"disc_number"`
|
|
DurationMs int `json:"duration_ms"`
|
|
Explicit bool `json:"explicit"`
|
|
ExternalIds struct {
|
|
Isrc string `json:"isrc"`
|
|
} `json:"external_ids"`
|
|
ExternalUrls struct {
|
|
Spotify string `json:"spotify"`
|
|
} `json:"external_urls"`
|
|
Href string `json:"href"`
|
|
ID string `json:"id"`
|
|
IsLocal bool `json:"is_local"`
|
|
IsPlayable bool `json:"is_playable"`
|
|
Name string `json:"name"`
|
|
Popularity int `json:"popularity"`
|
|
PreviewURL string `json:"preview_url"`
|
|
TrackNumber int `json:"track_number"`
|
|
Type string `json:"type"`
|
|
URI string `json:"uri"`
|
|
}
|
|
|
|
type SpotifyPlayingResponse struct {
|
|
IsPlaying bool `json:"is_playing"`
|
|
Item *SpotifyItem `json:"item"`
|
|
ProgressMs int `json:"progress_ms"`
|
|
Timestamp int `json:"timestamp"`
|
|
}
|
|
|
|
type SpotifyLastPlayed struct {
|
|
Items []struct {
|
|
Track SpotifyItem `json:"track"`
|
|
PlayedAt string `json:"played_at"`
|
|
}
|
|
}
|