spt

package
v0.0.0-...-78ec99f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *spotify.Client

	PageContinue = errors.New("CONTINUE")
)

Functions

func AddTracksToPlaylist

func AddTracksToPlaylist(playlistId spotify.ID, t ...spotify.ID) error

func GetArtistAlbums

func GetArtistAlbums(artistID spotify.ID) ([]spotify.SimpleAlbum, error)

func GetArtistTopTracks

func GetArtistTopTracks(artistID spotify.ID) ([]spotify.FullTrack, error)

func GetFullPlaylist

func GetFullPlaylist(id spotify.ID) (*spotify.FullPlaylist, error)

func GetPlayerState

func GetPlayerState() (*spotify.PlayerState, error)

func GetTopArtists

func GetTopArtists() ([]spotify.FullArtist, error)

func GetTopTracks

func GetTopTracks() ([]spotify.FullTrack, error)

func InitClient

func InitClient() error

func Next

func Next() error

func PlayContext

func PlayContext(context spotify.URI) error

func PlaySong

func PlaySong(uri spotify.URI) error

func PlaySongWithContext

func PlaySongWithContext(context spotify.URI, position int) error

func PlaySongWithContextURI

func PlaySongWithContextURI(context, uri spotify.URI) error

func Previous

func Previous() error

func QueueAlbum

func QueueAlbum(id spotify.ID) error

func QueuePlaylist

func QueuePlaylist(id spotify.ID) error

func QueueTracks

func QueueTracks(ids ...spotify.ID) error

func RecentlyPlayed

func RecentlyPlayed() ([]spotify.RecentlyPlayedItem, error)

func Repeat

func Repeat() error
func Search(s string) (*spotify.SearchResult, error)

func Shuffle

func Shuffle() error

func TogglePlayback

func TogglePlayback() error

func TransferPlayback

func TransferPlayback(deviceId spotify.ID) error

func UriToID

func UriToID(uri spotify.URI) (spotify.ID, error)

func UserDevices

func UserDevices() ([]spotify.PlayerDevice, error)

Types

type Album

type Album struct {
	spotify.FullAlbum
	Tracks *[]spotify.SimpleTrack
}

func GetAlbum

func GetAlbum(albumID spotify.ID) (*Album, chan error)

type FollowedArtists

type FollowedArtists []spotify.FullArtist

func CurrentUserFollowedArtists

func CurrentUserFollowedArtists() (*FollowedArtists, chan error)

type LikedSongs

type LikedSongs []spotify.SavedTrack

func CurrentUserSavedTracks

func CurrentUserSavedTracks() (*LikedSongs, chan error)

type Playable

type Playable interface {
	Type() string
	Uri()
}

type Playlist

type Playlist struct {
	SnapshotID string
	ID         spotify.ID
	Tracks     *[]spotify.PlaylistTrack
}

func GetPlaylist

func GetPlaylist(playlistId spotify.ID) (*Playlist, chan error)

type SavedAlbums

type SavedAlbums []spotify.SavedAlbum

func CurrentUserSavedAlbums

func CurrentUserSavedAlbums() (*SavedAlbums, chan error)

type UserPlaylists

type UserPlaylists []spotify.SimplePlaylist

func CurrentUserPlaylists

func CurrentUserPlaylists() (*UserPlaylists, chan error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL