Documentation ¶
Index ¶
- func ArtistUrl(apiKey string, artist string, limit int) string
- func BaseApiUrl(apiKey string, method string, format string, params map[string]string) string
- func FetchRequestToken(config config.ApiConfig) string
- func FetchSession(config config.ApiConfig, token string) string
- func Get(url string) chan []byte
- func Post(params map[string]string) chan []byte
- func SessionUrl(apiKey string, token string, apiSig string) string
- func Signature(params map[string]string, apiSecret string) string
- func TagUrl(apiKey string, tag string, limit int) string
- func TokenUrl(apiKey string, apiSig string) string
- func UserUrl(apiKey string, user string, limit int, period string) string
- type Artist
- type ArtistResponse
- type Playlist
- type PlaylistSaveResponse
- type Response
- type SessionResponse
- type TokenResponse
- type Track
- type TracksResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseApiUrl ¶
func FetchRequestToken ¶
Types ¶
type ArtistResponse ¶
type ArtistResponse struct { Topartists struct { Artists []Artist `json:"artist"` Attr struct { Tag string `json:"tag"` } `json:"@attr"` } `json:"topartists"` }
func ToArtists ¶
func ToArtists(httpBody []byte) ArtistResponse
func (ArtistResponse) ToString ¶
func (t ArtistResponse) ToString() string
type PlaylistSaveResponse ¶
type PlaylistSaveResponse struct { Playlists struct { PlaylistValue Playlist `xml:"playlist"` } `xml:"playlists"` }
func ToPlaylist ¶
func ToPlaylist(httpBody []byte) PlaylistSaveResponse
func (PlaylistSaveResponse) ToString ¶
func (t PlaylistSaveResponse) ToString() string
type SessionResponse ¶
type SessionResponse struct { Session struct { Name string `json:"name"` Key string `json:"key"` Subscriber string `json:"subscriber"` } `json:"session"` }
func ToSession ¶
func ToSession(httpBody []byte) SessionResponse
func (SessionResponse) ToString ¶
func (t SessionResponse) ToString() string
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
func ToToken ¶
func ToToken(httpBody []byte) TokenResponse
func (TokenResponse) ToString ¶
func (t TokenResponse) ToString() string
type Track ¶
type Track struct { Name string `json:"name"` Duration string `json:"duration"` Playcount string `json:"playcount"` Listeners string `json:"listeners"` Mbid string `json:"mbid"` URL string `json:"url"` Streamable struct { Text string `json:"#text"` Fulltrack string `json:"fulltrack"` } `json:"streamable"` Artist struct { Name string `json:"name"` } `json:"artist"` Image []struct { Text string `json:"#text"` Size string `json:"size"` } `json:"image"` Attr struct { Rank string `json:"rank"` } `json:"@attr"` }
type TracksResponse ¶
type TracksResponse struct { Toptracks struct { Tracks []Track `json:"track"` Attr struct { Artist string `json:"artist"` Page string `json:"page"` Perpage string `json:"perPage"` Totalpages string `json:"totalPages"` Total string `json:"total"` } `json:"@attr"` } `json:"toptracks"` }
generated by http://mholt.github.io/json-to-go/
func ToTracks ¶
func ToTracks(httpBody []byte) TracksResponse
func (TracksResponse) ToString ¶
func (t TracksResponse) ToString() string
Click to show internal directories.
Click to hide internal directories.