Documentation ¶
Index ¶
Constants ¶
View Source
const ( ENV_CLIENT_ID = "GOTIFY_CLIENT_ID" ENV_CLIENT_SECRET = "GOTIFY_CLIENT_SECRET" ENV_REDIRECT_URL = "GOTIFY_REDIRECT_URL" SPOTIFY_AUTH_URL = "https://accounts.spotify.com/authorize" SPOTIFY_TOKEN_URL = "https://accounts.spotify.com/api/token" )
Variables ¶
This section is empty.
Functions ¶
func AuthorizeClient ¶
func AuthorizeClient(auth *Oauth2Authenticator)
Types ¶
type Album ¶
func SearchAlbum ¶
type Artist ¶
func SearchArtist ¶
type Oauth2Authenticator ¶
func CreateAuthenticator ¶
func CreateAuthenticator(scopes ...Scope) *Oauth2Authenticator
func (*Oauth2Authenticator) GetAuthURL ¶
func (auth *Oauth2Authenticator) GetAuthURL() string
func (*Oauth2Authenticator) ParseToken ¶
func (auth *Oauth2Authenticator) ParseToken(res *http.Request)
type Playlist ¶
func GetPlaylist ¶
type Scope ¶
type Scope string
const ( PLAYLIST_READ_PRIVATE Scope = "playlist-read-private" PLAYLIST_MODIFY_PRIVATE Scope = "playlist-modify-private" PLAYLIST_MODIFY_PUBLIC Scope = "playlist-modify-public" STREAMING Scope = "streaming" USER_FOLLOW_MODIFY Scope = "user-follow-modify" USER_FOLLOW_READ Scope = "user-follow-read" USER_LIBRARY_READ Scope = "user-library-read" USER_LIBRARY_MODIFY Scope = "user-library-modify" USER_READ_PRIVATE Scope = "user-read-private" USER_READ_BIRTHDATE Scope = "user-read-birthdate" USER_READ_EMAIL Scope = "user-read-email" )
type SearchResult ¶
func Search ¶
func Search(what string, types []SearchType) SearchResult
type SearchType ¶
type SearchType string
const ( TRACK SearchType = "track" ARTIST SearchType = "artist" ALBUM SearchType = "album" )
type SpotifyPlaylist ¶
type SpotifyPlaylist struct { Id string `json:"id,omitempty"` Name string `json:"name"` Tracks []Track `json:"-"` Public bool `json:"public"` Owner string `json:"owner,omitempty"` Url string `json:"uri,omitempty"` }
func (*SpotifyPlaylist) AddTrack ¶
func (p *SpotifyPlaylist) AddTrack(t *Track) error
func (*SpotifyPlaylist) RemoveTrack ¶
func (p *SpotifyPlaylist) RemoveTrack(t *Track) error
type Track ¶
func SearchTrack ¶
Click to show internal directories.
Click to hide internal directories.