Documentation ¶
Index ¶
- func ArtistDataFromFullArtist(fa spotify.FullArtist) db.ArtistData
- func ArtistDataFromFullArtistIdx(fa spotify.FullArtist, _ int) db.ArtistData
- func CacheFullTracks(ctx context.Context, tx db.DBTX, tracks []*spotify.FullTrack)
- func GetAlbum(ctx context.Context, spClient *spotify.Client, id string) (*spotify.FullAlbum, error)
- func GetAlbum300Image(t spotify.SimpleAlbum) *spotify.Image
- func GetAlbumCache() map[string]spotify.FullAlbum
- func GetAlbums(ctx context.Context, spClient *spotify.Client, ids []string) (map[string]spotify.FullAlbum, error)
- func GetArtist(ctx context.Context, spClient *spotify.Client, id string) (*spotify.FullArtist, error)
- func GetArtist300Image(a spotify.FullArtist) *spotify.Image
- func GetArtistCache() map[string]spotify.FullArtist
- func GetArtists(ctx context.Context, spClient *spotify.Client, ids []string) (map[string]spotify.FullArtist, error)
- func GetArtistsForTrack(t spotify.FullTrack) []string
- func GetTrack(ctx context.Context, spClient *spotify.Client, id string) (*db.TrackData, error)
- func GetTracks(ctx context.Context, spClient *spotify.Client, ids []string) (map[string]db.TrackData, error)
- func GetTracksFromCache(ctx context.Context, tx db.DBTX, ids []string) (map[string]db.TrackData, error)
- func IDFromURI(uri string) (string, error)
- func IDFromURIMust(uri string) string
- func IDFromURIMustIdx(uri string, _ int) string
- func InsertParamsFromFullAlbums(albums []*spotify.FullAlbum) db.AlbumCacheInsertBulkNullableParams
- func InsertParamsFromFullArtists(artists []*spotify.FullArtist) db.ArtistCacheInsertBulkNullableParams
- func InsertParamsFromFullTracks(tracks []*spotify.FullTrack) db.TrackCacheInsertBulkNullableParams
- func PushToUserQueue(ctx context.Context, client *spotify.Client, songID string) error
- func SearchArtists(ctx context.Context, spClient *spotify.Client, text string) ([]db.ArtistData, error)
- func SearchTracks(ctx context.Context, spClient *spotify.Client, text string) ([]db.TrackData, error)
- func TrackDataFromFullTrack(ft spotify.FullTrack) db.TrackData
- func TrackDataFromFullTrackIdx(ft spotify.FullTrack, _ int) db.TrackData
- func UpdateUserPlayback(ctx context.Context, client *spotify.Client, playbackStatus *CurrentQueue) error
- type CurrentQueue
- type SpotifyUser
- type TrackArtist
- type TrackData
- type TrackInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArtistDataFromFullArtist ¶
func ArtistDataFromFullArtist(fa spotify.FullArtist) db.ArtistData
func ArtistDataFromFullArtistIdx ¶
func ArtistDataFromFullArtistIdx(fa spotify.FullArtist, _ int) db.ArtistData
func CacheFullTracks ¶
func GetAlbum300Image ¶
func GetAlbum300Image(t spotify.SimpleAlbum) *spotify.Image
func GetAlbumCache ¶
func GetAlbumCache() map[string]spotify.FullAlbum
func GetArtist300Image ¶
func GetArtist300Image(a spotify.FullArtist) *spotify.Image
func GetArtistCache ¶
func GetArtistCache() map[string]spotify.FullArtist
func GetArtists ¶
func GetArtistsForTrack ¶
func GetArtistsForTrack(t spotify.FullTrack) []string
func GetTracksFromCache ¶
func IDFromURIMust ¶
func IDFromURIMustIdx ¶
func InsertParamsFromFullAlbums ¶
func InsertParamsFromFullAlbums(albums []*spotify.FullAlbum) db.AlbumCacheInsertBulkNullableParams
func InsertParamsFromFullArtists ¶
func InsertParamsFromFullArtists(artists []*spotify.FullArtist) db.ArtistCacheInsertBulkNullableParams
func InsertParamsFromFullTracks ¶
func InsertParamsFromFullTracks(tracks []*spotify.FullTrack) db.TrackCacheInsertBulkNullableParams
func PushToUserQueue ¶
func SearchArtists ¶
func SearchTracks ¶
func TrackDataFromFullTrack ¶
func UpdateUserPlayback ¶
func UpdateUserPlayback(ctx context.Context, client *spotify.Client, playbackStatus *CurrentQueue) error
Types ¶
type CurrentQueue ¶
type CurrentQueue struct { CurrentlyPlaying TrackInfo `json:"currently_playing"` Queue []TrackInfo `json:"queue"` }
func GetUserQueue ¶
func GetUserQueue(ctx context.Context, client *spotify.Client) (*CurrentQueue, error)
type SpotifyUser ¶
type TrackArtist ¶
type TrackData ¶
type TrackData struct { ID string `json:"id"` Uri string `json:"uri"` Name string `json:"name"` AlbumID string `json:"album_id"` AlbumUri string `json:"album_uri"` AlbumName string `json:"album_name"` ArtistID string `json:"artist_id"` ArtistUri string `json:"artist_uri"` ArtistName string `json:"artist_name"` ImageUrl *string `json:"image_url"` OtherArtists TrackArtist `json:"other_artists"` DurationMs int32 `json:"duration_ms"` Popularity int32 `json:"popularity"` Explicit bool `json:"explicit"` PreviewUrl string `json:"preview_url"` DiscNumber int32 `json:"disc_number"` TrackNumber int32 `json:"track_number"` Type string `json:"type"` ExternalIds spotify.TrackExternalIDs `json:"external_ids"` Isrc *string `json:"isrc"` }
type TrackInfo ¶
type TrackInfo struct { ID string `json:"id"` Name string `json:"name"` Artists []spotify.SimpleArtist `json:"artists"` Image *spotify.Image `json:"image"` AddedBy string `json:"added_by,omitempty"` AddedAt time.Time `json:"-"` Paused bool `json:"paused"` DurationMS int `json:"duration_ms,omitempty"` StartedPlayingEpochMilis *int64 `json:"started_playing_epoch_ms,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.