Documentation ¶
Index ¶
- Constants
- type Client
- func (sc *Client) AddSongsToPlaylist(ctx context.Context, songs []string, playlistId string) error
- func (sc *Client) Do(req *http.Request) (*http.Response, error)
- func (sc *Client) GetCurrentPlaylist(ctx context.Context, playlistId string) ([]Track, error)
- func (sc *Client) GetTrackBySongNameAndArtist(ctx context.Context, name string, artists []string) (Track, error)
- func (sc *Client) RemoveSongsFromPlaylist(ctx context.Context, songs []Track, playlistId string) error
- type Clienter
- type PlaylistTrackItem
- type PlaylistTracks
- type SearchTrackItem
- type SearchTracks
- type SearchTracksResponse
- type TokenRefreshResponse
- type Track
Constants ¶
View Source
const ( ContentType = "application/json; charset=UTF-8" Market = "AU" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddSongsToPlaylist ¶
func (*Client) GetCurrentPlaylist ¶
func (*Client) GetTrackBySongNameAndArtist ¶
type Clienter ¶
type Clienter interface { GetCurrentPlaylist(ctx context.Context, playlistId string) ([]Track, error) GetTrackBySongNameAndArtist(ctx context.Context, name string, artist []string) (Track, error) RemoveSongsFromPlaylist(ctx context.Context, songs []Track, playlistId string) error AddSongsToPlaylist(ctx context.Context, songs []string, playlistId string) error }
func NewSpotifyClient ¶
type PlaylistTrackItem ¶
type PlaylistTrackItem struct {
Track Track `json:"track"`
}
type PlaylistTracks ¶
type PlaylistTracks struct {
Items []PlaylistTrackItem `json:"items"`
}
type SearchTrackItem ¶
type SearchTracks ¶
type SearchTracks struct {
Items []SearchTrackItem `json:"items"`
}
type SearchTracksResponse ¶
type SearchTracksResponse struct {
Tracks SearchTracks `json:"tracks"`
}
type TokenRefreshResponse ¶
Click to show internal directories.
Click to hide internal directories.