Documentation ¶
Index ¶
- type Album
- type Artist
- type Callback
- type Client
- func (m *Client) GetAlbum(uri string) (albumID string, album *Spotify.Album, err error)
- func (m *Client) GetArtist(uri string) (artistID string, artist *Spotify.Artist, err error)
- func (m *Client) GetPlaylist(id string) (*Spotify.SelectedListContent, error)
- func (m *Client) GetRootPlaylist(username string) (*Spotify.SelectedListContent, error)
- func (m *Client) GetToken(clientId string, scopes string) (*Token, error)
- func (m *Client) GetTrack(uri string) (trackID string, track *Spotify.Track, err error)
- func (m *Client) Handle(cmd uint8, reader io.Reader) error
- func (m *Client) NextSeq() []byte
- func (m *Client) NextSeqWithInt() (uint32, []byte)
- func (m *Client) Request(req Request, cb Callback) error
- func (m *Client) Search(search string, limit int, country string, username string) (*SearchResponse, error)
- func (m *Client) Subscribe(uri string, recv chan Response, cb Callback) error
- func (m *Client) Suggest(search string) (*SuggestResult, error)
- type Connection
- type Genre
- type Internal
- type Pending
- type Playlist
- type Profile
- type Request
- type Response
- type SearchResponse
- type SearchResult
- type Show
- type SuggestResult
- type Token
- type TopHit
- type TopRecommendation
- type Track
- type VideoEpisode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func CreateMercury ¶
func CreateMercury(stream connection.PacketStream) *Client
CreateMercury initializes a Connection for the specified session.
func (*Client) GetPlaylist ¶
func (m *Client) GetPlaylist(id string) (*Spotify.SelectedListContent, error)
func (*Client) GetRootPlaylist ¶
func (m *Client) GetRootPlaylist(username string) (*Spotify.SelectedListContent, error)
func (*Client) NextSeqWithInt ¶
type Connection ¶
type Response ¶
type Response struct { HeaderData []byte Uri string Payload [][]byte StatusCode int32 SeqKey string }
func (*Response) CombinePayload ¶
type SearchResponse ¶
type SearchResponse struct { Results SearchResult `json:"results"` RequestId string `json:"requestId"` CategoriesOrder []string `json:"categoriesOrder"` }
type SearchResult ¶
type SearchResult struct { Tracks struct { Hits []Track `json:"hits"` Total int `json:"total"` } `json:"tracks"` Albums struct { Hits []Album `json:"hits"` Total int `json:"total"` } `json:"albums"` Artists struct { Hits []Artist `json:"hits"` Total int `json:"total"` } `json:"artists"` Playlists struct { Hits []Playlist `json:"hits"` Total int `json:"total"` } `json:"playlists"` Profiles struct { Hits []Profile `json:"hits"` Total int `json:"total"` } `json:"profiles"` Genres struct { Hits []Genre `json:"hits"` Total int `json:"total"` } `json:"genres"` TopHit struct { Hits []TopHit `json:"hits"` Total int `json:"total"` } `json:"topHit"` Shows struct { Hits []Show `json:"hits"` Total int `json:"total"` } `json:"shows"` VideoEpisodes struct { Hits []VideoEpisode `json:"hits"` Total int `json:"total"` } `json:"videoEpisodes"` TopRecommendations struct { Hits []TopRecommendation `json:"hits"` Total int `json:"total"` } `json:"topRecommendations"` Error error }
type SuggestResult ¶
type SuggestResult struct { Sections []struct { RawItems json.RawMessage `json:"items"` Typ string `json:"type"` } `json:"sections"` Albums []Artist Artists []Album Tracks []Track TopHits []TopHit Error error }
func ParseSuggest ¶
func ParseSuggest(body []byte) (*SuggestResult, error)
type TopHit ¶
type TopHit struct { Uri string `json:"uri"` Name string `json:"name"` Image string `json:"image"` Verified bool `json:"verified"` Following bool `json:"following"` FollowersCount int `json:"followersCount"` Author string `json:"author"` Log struct { Origin string `json:"origin"` TopHit string `json:"top_hit"` } `json:"log"` Artists []Artist `json:"artists"` Album Album `json:"album"` }
type TopRecommendation ¶
type TopRecommendation struct { }
type VideoEpisode ¶
Click to show internal directories.
Click to hide internal directories.