Documentation
¶
Index ¶
- func AddTrackToPlaylist(playlist_id string, track_id string) bool
- func AddTracksToPlaylist(playlist_id string, track_ids []string) bool
- func LoadConfig(filePath ...string)
- func RefreshToken()
- type Album
- type Artist
- type Auth_Response
- type ConfigFile
- type CurrentTrack
- type Image
- type Playlist
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTrackToPlaylist ¶
func AddTracksToPlaylist ¶
func LoadConfig ¶
func LoadConfig(filePath ...string)
func RefreshToken ¶
func RefreshToken()
Types ¶
type Album ¶
type Album struct {
Album_type string `json:"album_type"`
Artists []Artist `json:"artists"`
External_urls struct {
Spotify string `json:"spotify"`
} `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Name string `json:"name"`
Release_date string `json:"release_date"`
Release_date_precision string `json:"release_date_precision"`
Total_tracks int `json:"total_tracks"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type Auth_Response ¶
type ConfigFile ¶
type ConfigFile struct {
// contains filtered or unexported fields
}
type CurrentTrack ¶
type CurrentTrack struct {
Item Track `json:"item"`
Progress_ms int `json:"progress_ms"`
Timestamp int `json:"timestamp"`
Is_playing bool `json:"is_playing"`
}
func GetCurrentSong ¶
func GetCurrentSong() CurrentTrack
type Playlist ¶
type Playlist struct {
Href string `json:"href"`
Id string `json:"id"`
Name string `json:"name"`
Owner struct {
Display_name string `json:"display_name"`
External_urls struct {
Spotify string `json:"spotify"`
} `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Type string `json:"type"`
Uri string `json:"uri"`
} `json:"owner"`
Public bool `json:"public"`
Collaborative bool `json:"collaborative"`
Followers struct {
Href interface{} `json:"href"`
Total int `json:"total"`
} `json:"followers"`
Images []Image `json:"images"`
Tracks struct {
Href string `json:"href"`
Total int `json:"total"`
Item []struct {
Added_at string `json:"added_at"`
Added_by struct {
External_urls struct {
Spotify string `json:"spotify"`
} `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Type string `json:"type"`
Uri string `json:"uri"`
} `json:"added_by"`
Is_local bool `json:"is_local"`
Track Track `json:"track"`
} `json:"items"`
} `json:"tracks"`
Type string `json:"type"`
Uri string `json:"uri"`
}
func GetPlaylist ¶
type Track ¶
type Track struct {
Album Album `json:"album"`
Artists []Artist `json:"artists"`
Disc_number int `json:"disc_number"`
Duration_ms int `json:"duration_ms"`
Explicit bool `json:"explicit"`
External_ids struct {
Isrc string `json:"isrc"`
} `json:"external_ids"`
External_urls struct {
Spotify string `json:"spotify"`
} `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Is_local bool `json:"is_local"`
Name string `json:"name"`
Popularity int `json:"popularity"`
Preview_url string `json:"preview_url"`
Track_number int `json:"track_number"`
Type string `json:"type"`
Uri string `json:"uri"`
}
Click to show internal directories.
Click to hide internal directories.