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) Next() error
- func (gp *GotifyPlayer) Pause() error
- func (gp *GotifyPlayer) Play() error
- func (gp *GotifyPlayer) Previous() error
- func (gp *GotifyPlayer) Repeat(state lib.RepeatMode) error
- func (gp *GotifyPlayer) Seek(position time.Duration) error
- func (gp *GotifyPlayer) Send(method lib.HTTPMethod, action string, options [][2]string, body []byte) ([]byte, error)
- func (gp *GotifyPlayer) Shuffle(state bool) error
- func (gp *GotifyPlayer) Token() (*oauth2.Token, error)
- func (gp *GotifyPlayer) Volume(volume int) 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
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) Next ¶
func (gp *GotifyPlayer) Next() error
func (*GotifyPlayer) Pause ¶
func (gp *GotifyPlayer) Pause() error
func (*GotifyPlayer) Play ¶
func (gp *GotifyPlayer) Play() error
func (*GotifyPlayer) Previous ¶
func (gp *GotifyPlayer) Previous() error
func (*GotifyPlayer) Repeat ¶
func (gp *GotifyPlayer) Repeat(state lib.RepeatMode) error
func (*GotifyPlayer) Send ¶
func (gp *GotifyPlayer) Send(method lib.HTTPMethod, action string, options [][2]string, body []byte) ([]byte, error)
func (*GotifyPlayer) Shuffle ¶
func (gp *GotifyPlayer) Shuffle(state bool) error
func (*GotifyPlayer) Token ¶
func (gp *GotifyPlayer) Token() (*oauth2.Token, error)
Token get current active token.
func (*GotifyPlayer) Volume ¶
func (gp *GotifyPlayer) Volume(volume int) error
Click to show internal directories.
Click to hide internal directories.