Documentation
¶
Index ¶
- Constants
- type GotifyPlayer
- func (gp *GotifyPlayer) AuthenticateHTTP(port uint16) error
- func (gp *GotifyPlayer) AuthenticateStdin() error
- func (gp *GotifyPlayer) AuthenticateToken(token *oauth2.Token) error
- func (gp *GotifyPlayer) Send(method lib.HttpMethod, url string, options [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendAlbums(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendArtists(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendAudiobooks(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendCategories(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendChapters(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendEpisodes(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendGenres(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendMarkets(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendPlayer(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendPlaylists(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendSearch(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendShows(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendTracks(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) SendUsers(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) Token() (*oauth2.Token, error)
Constants ¶
View Source
const ( RepeatTrack = lib.RepeatTrack RepeatContext = lib.RepeatContext RepeatOff = lib.RepeatOff TimeRangeLongTerm = lib.TimeRangeLongTerm TimeRangeMediumTerm = lib.TimeRangeMediumTerm TimeRangeShortTerm = lib.TimeRangeShortTerm )
View Source
const ( ScopeUgcImageUpload scope = "ugc-image-upload" // Write access to user-provided images. ScopeUserReadPlaybackState scope = "user-read-playback-state" // Read access to a user’s player state. ScopeUserModifyPlaybackState scope = "user-modify-playback-state" // Write access to a user’s playback state ScopeUserReadCurrentlyPlaying scope = "user-read-currently-playing" // Read access to a user’s currently playing content. ScopeAppRemoteControl scope = "app-remote-control" // Remote control playback of Spotify. This scope is currently available to Spotify iOS and Android SDKs. ScopeStreaming scope = "streaming" // Control playback of a Spotify track. This scope is currently available to the Web Playback SDK. The user must have a Spotify Premium account. ScopePlaylistReadPrivate scope = "playlist-read-private" // Read access to user's private playlists. ScopePlaylistReadCollaborative scope = "playlist-read-collaborative" // Include collaborative playlists when requesting a user's playlists. ScopePlaylistModifyPrivate scope = "playlist-modify-private" // Write access to a user's private playlists. ScopePlaylistModifyPublic scope = "playlist-modify-public" // Write access to a user's public playlists. ScopeUserFollowModify scope = "user-follow-modify" // Write/delete access to the list of artists and other users that the user follows. ScopeUserFollowRead scope = "user-follow-read" // Read access to the list of artists and other users that the user follows. ScopeUserReadPlaybackPosition scope = "user-read-playback-position" // Read access to a user’s playback position in a content. ScopeUserTopRead scope = "user-top-read" // Read access to a user's top artists and tracks. ScopeUserReadRecentlyPlayed scope = "user-read-recently-played" // Read access to a user’s recently played tracks. ScopeUserLibraryModify scope = "user-library-modify" // Write/delete access to a user's "Your Music" library. ScopeUserLibraryRead scope = "user-library-read" // Read access to a user's library. ScopeUserReadEmail scope = "user-read-email" // Read access to user’s email address. ScopeUserReadPrivate scope = "user-read-private" // Read access to user’s subscription details (type of user account). ScopeUserPersonalized scope = "user-personalized" // Get personalized content for the user. ScopeUserSoaLink scope = "user-soa-link" // Link a partner user account to a Spotify user account ScopeUserSoaUnlink scope = "user-soa-unlink" // Unlink a partner user account from a Spotify account ScopeSoaManageEntitlements scope = "soa-manage-entitlements" // Modify entitlements for linked users ScopeSoaManagePartner scope = "soa-manage-partner" // Update partner information ScopeSoaCreatePartner scope = "soa-create-partner" // Create new partners, platform partners only )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GotifyPlayer ¶
type GotifyPlayer struct {
URL string
// Albums Albums.Albums
// Artists Artists.Artists
// Audiobooks Audiobooks.Audiobooks
Categories Categories.Categories
Chapters Chapters.Chapters
// Episodes Episodes.Episodes
Genres Genres.Genres
Markets Markets.Markets
Player Player.Player
// Playlists Playlists.Playlists
// Search Search.Search
// Shows Shows.Shows
// Tracks Tracks.Tracks
Users Users.Users
// contains filtered or unexported fields
}
func NewGotifyPlayer ¶
func NewGotifyPlayer(clientID, redirectURL string, scopes ...scope) *GotifyPlayer
func (*GotifyPlayer) AuthenticateHTTP ¶
func (gp *GotifyPlayer) AuthenticateHTTP(port uint16) error
Authenticate using local http server.
func (*GotifyPlayer) AuthenticateStdin ¶
func (gp *GotifyPlayer) AuthenticateStdin() error
Authenticate using stdin.
func (*GotifyPlayer) AuthenticateToken ¶
func (gp *GotifyPlayer) AuthenticateToken(token *oauth2.Token) error
Authenticate using a token.
func (*GotifyPlayer) Send ¶
func (gp *GotifyPlayer) Send(method lib.HttpMethod, url string, options [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendAlbums ¶
func (gp *GotifyPlayer) SendAlbums(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendArtists ¶
func (gp *GotifyPlayer) SendArtists(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendAudiobooks ¶
func (gp *GotifyPlayer) SendAudiobooks(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendCategories ¶
func (gp *GotifyPlayer) SendCategories(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendChapters ¶
func (gp *GotifyPlayer) SendChapters(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendEpisodes ¶
func (gp *GotifyPlayer) SendEpisodes(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendGenres ¶
func (gp *GotifyPlayer) SendGenres(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendMarkets ¶
func (gp *GotifyPlayer) SendMarkets(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendPlayer ¶
func (gp *GotifyPlayer) SendPlayer(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendPlaylists ¶
func (gp *GotifyPlayer) SendPlaylists(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendSearch ¶
func (gp *GotifyPlayer) SendSearch(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendShows ¶
func (gp *GotifyPlayer) SendShows(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendTracks ¶
func (gp *GotifyPlayer) SendTracks(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) SendUsers ¶
func (gp *GotifyPlayer) SendUsers(method lib.HttpMethod, action string, option [][2]string, body []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.