package
0.0.0-20210908215037-e9c39842ec0e
Repository: https://github.com/joshuathompson/baton.git
Documentation: pkg.go.dev
# Functions
AuthorizeWithCode completes the Authorization process and stores your refresh and current access tokens in the config directory for Baton.
GetAlbumsForArtist returns a list of "Simple" Album objects in a paging object for the given artist.
GetAuthorizationURL builds an Authorization URL for the user to navigate to from their ClientID.
GetDevices returns a list of available playback devices.
GetMyPlaylists takes in the Next field from the paging objects returned from GetTracksForPlaylist and allows you to move forward through the tracks.
GetNextAlbumsForArtist takes in the Next field from the paging objects returned from GetAlbumsForArtist and allows you to move forward through the albums.
GetNextMyPlaylists takes in the Next fields from the paging objects returned from me/playlists and allows you to move forward through the results.
GetNextSavedAlbums takes in the Next fields from the paging objects returned from Saved Albums and moves forward through the results.
GetNextSavedTracks takes in the Next fields from the paging objects returned from Saved and moves forward through the results.
GetNextSearchResults takes in the Next fields from the paging objects returned from Search and allows you to move forward through the results.
GetNextTracksForAlbum takes in the Next field from the paging objects returned from GetTracksForAlbum and allows you to move forward through the tracks.
GetNextTracksForPlaylist takes in the Next field from the paging objects returned from GetTracksForPlaylist and allows you to move forward through the tracks.
GetPlayerState returns the active device, whether the player is paused, progress of current song, and other playback information.
GetSavedAlbums returns a list of all the albums the user has saved.
GetSavedTracks returns a list of all the songs the user has saved.
GetTracksForAlbum returns a list of "Simple" Track objects in a paging object for the given album.
GetTracksForPlaylist returns a list of PlaylistTrack objects in a paging object for the given user and playlist.
PausePlayback pauses playback on the current device.
RemoveSavedAlbum takes in an AlbumID and removes it from the users library.
RemoveSavedTrack takes in a TrackID and removes it from the users library.
SaveAlbum takes in an AlbumID and saves it to the users library.
SaveTrack takes in a TrackID and saves it to the users library.
Search queries the Spotify API based on the given query and options and returns the results wrapped in paging objects.
SeekToPosition skips to a position defined in seconds for the current playback.
SetRepeatMode allows you to set the Repeat Mode of the current device Allowed values are track, context, and off.
SetVolume allows you to control the volume percentage of the device Allowed values are 0-100.
SkipToNext skips to the next song within the current context.
SkipToPrevious skips to the previous song within the current context.
StartPlayback can resume playback or change playback to a new URI/context.
ToggleShuffle toggles the shuffle state on/off.
No description provided by the author
# Structs
The Device struct describes an available playback device.
The Devices struct is needed because the /devices endpoint returns the devices wrapped in a root object .
The Followers struct describes the followers for an artist, playlist, etc.
The FullArtist struct describes a "Full" Artist object as defined by the Spotify Web API.
The FullArtistsPaged struct is a slice of FullArtist objects wrapped in a Spotify paging object.
The FullTrack struct describes a "Full" Track object as defined by the Spotify Web API.
The FullTracksPaged struct is a slice of FullTrack objects wrapped in a Spotify paging object.
The Image struct describes an album, artist, playlist, etc image.
The Options struct describes options that can be used by the majority of API endpoints.
The PlayerContext struct describes the current context of what is playing on the active device.
The PlayerOffsetOptions describes how to set the offset within a context when controlling playback For example, you can use Position to specify track number within an album OR you can use the URI to point to that same track directly.
The PlayerOptions struct describes options that are specific to the /me/player endpoints.
The PlayerState struct describes the current playback state of Spotify.
The PlaylistTrack struct describes a Playlist Track object as defined by the Spotify Web API.
The PlaylistTrackLinks struct describes a Playlist Track Link object as defined by the Spotify Web API.
The PlaylistTracksPaged struct is a slice of PlaylistTrack objects wrapped in a Spotify paging object.
The SavedAlbum struct describes a Saved Track object as defined by the Spotify Web API.
The SavedAlbumsPaged struct is a slice of SavedAlbum objects wrapped in a Spotify paging object.
The SavedTrack struct describes a Saved Track object as defined by the Spotify Web API.
The SavedTracksPaged struct is a slice of SavedTrack objects wrapped in a Spotify paging object.
The SearchOptions struct describes the possible optional arguments for the Search function.
The SearchResults struct describes the potential results of any search against the Spotify API.
The SimpleAlbum struct describes a "Simple" Album object as defined by the Spotify Web API.
The SimpleAlbumsPaged struct is a slice of SimpleAlbum objects wrapped in a Spotify paging object.
The SimpleArtist struct describes a "Simple" Artist object as defined by the Spotify Web API.
The SimplePlaylist struct describes a "Simple" Playlist object as defined by the Spotify Web API.
The SimplePlaylistsPaged struct is a slice of SimplePlaylist objects wrapped in a Spotify paging object.
The SimpleTrack struct describes a "Simple" Track object as defined by the Spotify Web API.
The SimpleTracksPaged struct is a slice of SimpleTrack objects wrapped in a Spotify paging object.
The Tokens struct describes a combination of the items returned from Spotify's API Authorization process as well as Baton-created fields to store in your config directory .
The TrackLink struct describes a TrackLink object as defined by the Spotify Web API.
No description provided by the author
The User struct describes a User object as defined by the Spotify Web API.