Documentation
¶
Index ¶
- func AccessToken(token string) func(*Client)
- func BaseURL(baseURL *url.URL) func(*Client)
- func HttpClient(httpClient Doer) func(*Client)
- type AccountService
- type AccountStatus
- type Client
- func (c *Client) Account() *AccountService
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) Genres() *GenresService
- func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) Queue() *QueueService
- func (c *Client) Tracks() *TracksService
- type Doer
- type Error
- type GenresListResp
- type GenresService
- type InvocationInfo
- type QueueItem
- type QueueResponse
- type QueueService
- type TrackResp
- type TracksService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessToken ¶
func HttpClient ¶
Types ¶
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func (*AccountService) GetAccountStatus ¶
func (as *AccountService) GetAccountStatus(ctx context.Context) (AccountStatus, *http.Response, error)
type AccountStatus ¶
type AccountStatus map[string]interface{}
func (AccountStatus) GetValue ¶
func (as AccountStatus) GetValue(valueName string) interface{}
func (AccountStatus) Raw ¶
func (as AccountStatus) Raw() map[string]interface{}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Account ¶
func (c *Client) Account() *AccountService
func (*Client) Genres ¶ added in v0.1.5
func (c *Client) Genres() *GenresService
func (*Client) NewRequest ¶
func (*Client) Queue ¶ added in v0.1.5
func (c *Client) Queue() *QueueService
func (*Client) Tracks ¶ added in v0.1.5
func (c *Client) Tracks() *TracksService
type GenresListResp ¶
type GenresListResp map[string]interface{}
type GenresService ¶
type GenresService struct {
// contains filtered or unexported fields
}
func (*GenresService) List ¶
func (s *GenresService) List(ctx context.Context) (GenresListResp, *http.Response, error)
type InvocationInfo ¶
type QueueResponse ¶
type QueueResponse map[string]interface{}
func (QueueResponse) GetCurrentTrack ¶
func (q QueueResponse) GetCurrentTrack(ctx context.Context) (int64, error)
type QueueService ¶
type QueueService struct {
// contains filtered or unexported fields
}
func (*QueueService) GetQueue ¶
func (q *QueueService) GetQueue(ctx context.Context, queueId int64) (QueueResponse, *http.Response, error)
func (*QueueService) GetQueueItem ¶
type TrackResp ¶
type TrackResp struct { InvocationInfo InvocationInfo `json:"invocationInfo"` Error Error `json:"error"` Result []Track `json:"result"` }
Click to show internal directories.
Click to hide internal directories.