Documentation
¶
Overview ¶
Package lastfmgo provides a Go wrapper for the last.fm REST API (2.0) and modern alternative to shkh/lastfm-go. This library aims to be idomatic, simple, and powerful at the same time.
Generally, using this library involves creating a new client (web, mobile, or desktop). For write endpoints (e.g., track.scrobble or album.addTags), this client needs to be authenticated to generate a session key. This session key can be used alongside the other parameters to make authenticated requests. Please refer to the last.fm API documentation for the other required and optional parameters.
The parameters "api_key" and "api_sig" are set automatically by the client and do not need to be specified. The client also automatically handles API errors and converts them to Go errors.
Please refer to the examples for common use cases (e.g., authentication, scrobbling, error handling, and integration with other libraries).
Index ¶
- Constants
- type AlbumAddTagsResponse
- type AlbumGetInfoResponse
- type AlbumGetTagsResponse
- type AlbumGetTopTagsResponse
- type AlbumRemoveTagResponse
- type AlbumSearchResponse
- type ArtistAddTagsResponse
- type ArtistGetCorrectionResponse
- type ArtistGetInfoResponse
- type ArtistGetSimilarResponse
- type ArtistGetTagsResponse
- type ArtistGetTopAlbumsResponse
- type ArtistGetTopTagsResponse
- type ArtistGetTopTracksResponse
- type ArtistRemoveTagResponse
- type ArtistSearchResponse
- type AuthGetMobileSessionResponse
- type AuthGetSessionResponse
- type AuthGetTokenResponse
- type BaseResponse
- type ChartGetTopArtistsResponse
- type ChartGetTopTagsResponse
- type ChartGetTopTracksResponse
- type Client
- func (c Client) AlbumAddTags(params P) (AlbumAddTagsResponse, error)
- func (c Client) AlbumGetInfo(params P) (AlbumGetInfoResponse, error)
- func (c Client) AlbumGetTags(params P) (AlbumGetTagsResponse, error)
- func (c Client) AlbumGetTopTags(params P) (AlbumGetTopTagsResponse, error)
- func (c Client) AlbumRemoveTag(params P) (AlbumRemoveTagResponse, error)
- func (c Client) AlbumSearch(params P) (AlbumSearchResponse, error)
- func (c Client) ArtistAddTags(params P) (ArtistAddTagsResponse, error)
- func (c Client) ArtistGetCorrection(params P) (ArtistGetCorrectionResponse, error)
- func (c Client) ArtistGetInfo(params P) (ArtistGetInfoResponse, error)
- func (c Client) ArtistGetSimilar(params P) (ArtistGetSimilarResponse, error)
- func (c Client) ArtistGetTags(params P) (ArtistGetTagsResponse, error)
- func (c Client) ArtistGetTopAlbums(params P) (ArtistGetTopAlbumsResponse, error)
- func (c Client) ArtistGetTopTags(params P) (ArtistGetTopTagsResponse, error)
- func (c Client) ArtistGetTopTracks(params P) (ArtistGetTopTracksResponse, error)
- func (c Client) ArtistRemoveTag(params P) (ArtistRemoveTagResponse, error)
- func (c Client) ArtistSearch(params P) (ArtistSearchResponse, error)
- func (c Client) AuthGetMobileSession() (AuthGetMobileSessionResponse, error)
- func (c Client) AuthGetSession(token string) (AuthGetSessionResponse, error)
- func (c Client) AuthGetToken() (AuthGetTokenResponse, error)
- func (c Client) ChartGetTopArtists(params P) (ChartGetTopArtistsResponse, error)
- func (c Client) ChartGetTopTags(params P) (ChartGetTopTagsResponse, error)
- func (c Client) ChartGetTopTracks(params P) (ChartGetTopTracksResponse, error)
- func (c Client) DesktopAuthorizationURL(token string) string
- func (c Client) GeoGetTopArtists(params P) (GeoGetTopArtistsResponse, error)
- func (c Client) GeoGetTopTracks(params P) (GeoGetTopTracksResponse, error)
- func (c Client) LibraryGetArtists(params P) (LibraryGetArtistsResponse, error)
- func (c Client) TagGetInfo(params P) (TagGetInfoResponse, error)
- func (c Client) TagGetSimilar(params P) (TagGetSimilarResponse, error)
- func (c Client) TagGetTopAlbums(params P) (TagGetTopAlbumsResponse, error)
- func (c Client) TagGetTopArtists(params P) (TagGetTopArtistsResponse, error)
- func (c Client) TagGetTopTags(params P) (TagGetTopTagsResponse, error)
- func (c Client) TagGetTopTracks(params P) (TagGetTopTracksResponse, error)
- func (c Client) TagGetWeeklyChartList(params P) (TagGetWeeklyChartListResponse, error)
- func (c Client) TrackAddTags(params P) (TrackAddTagsResponse, error)
- func (c Client) TrackGetCorrection(params P) (TrackGetCorrectionResponse, error)
- func (c Client) TrackGetInfo(params P) (TrackGetInfoResponse, error)
- func (c Client) TrackGetSimilar(params P) (TrackGetSimilarResponse, error)
- func (c Client) TrackGetTags(params P) (TrackGetTagsResponse, error)
- func (c Client) TrackGetTopTags(params P) (TrackGetTopTagsResponse, error)
- func (c Client) TrackLove(params P) (TrackLoveResponse, error)
- func (c Client) TrackRemoveTag(params P) (TrackRemoveTagResponse, error)
- func (c Client) TrackScrobble(params P) (TrackScrobbleResponse, error)
- func (c Client) TrackSearch(params P) (TrackSearchResponse, error)
- func (c Client) TrackUnlove(params P) (TrackUnloveResponse, error)
- func (c Client) TrackUpdateNowPlaying(params P) (TrackUpdateNowPlayingResponse, error)
- func (c Client) UserGetFriends(params P) (UserGetFriendsResponse, error)
- func (c Client) UserGetInfo(params P) (UserGetInfoResponse, error)
- func (c Client) UserGetLovedTracks(params P) (UserGetLovedTracksResponse, error)
- func (c Client) UserGetPersonalTags(params P) (UserGetPersonalTagsResponse, error)
- func (c Client) UserGetRecentTracks(params P) (UserGetRecentTracksResponse, error)
- func (c Client) UserGetTopAlbums(params P) (UserGetTopAlbumsResponse, error)
- func (c Client) UserGetTopArtists(params P) (UserGetTopArtistsResponse, error)
- func (c Client) UserGetTopTags(params P) (UserGetTopTagsResponse, error)
- func (c Client) UserGetTopTracks(params P) (UserGetTopTracksResponse, error)
- func (c Client) UserGetWeeklyAlbumChart(params P) (UserGetWeeklyAlbumChartResponse, error)
- func (c Client) UserGetWeeklyArtistChart(params P) (UserGetWeeklyArtistChartResponse, error)
- func (c Client) UserGetWeeklyChartList(params P) (UserGetWeeklyChartListResponse, error)
- func (c Client) UserGetWeeklyTrackChart(params P) (UserGetWeeklyTrackChartResponse, error)
- func (c Client) WebAuthorizationURL() string
- type GeoGetTopArtistsResponse
- type GeoGetTopTracksResponse
- type LibraryGetArtistsResponse
- type OpenSearchResponse
- type P
- type PaginationResponse
- type TagGetInfoResponse
- type TagGetSimilarResponse
- type TagGetTopAlbumsResponse
- type TagGetTopArtistsResponse
- type TagGetTopTagsResponse
- type TagGetTopTracksResponse
- type TagGetWeeklyChartListResponse
- type TrackAddTagsResponse
- type TrackGetCorrectionResponse
- type TrackGetInfoResponse
- type TrackGetSimilarResponse
- type TrackGetTagsResponse
- type TrackGetTopTagsResponse
- type TrackLoveResponse
- type TrackRemoveTagResponse
- type TrackScrobbleResponse
- type TrackSearchResponse
- type TrackUnloveResponse
- type TrackUpdateNowPlayingResponse
- type UserGetFriendsResponse
- type UserGetInfoResponse
- type UserGetLovedTracksResponse
- type UserGetPersonalTagsResponse
- type UserGetRecentTracksResponse
- type UserGetTopAlbumsResponse
- type UserGetTopArtistsResponse
- type UserGetTopTagsResponse
- type UserGetTopTracksResponse
- type UserGetWeeklyAlbumChartResponse
- type UserGetWeeklyArtistChartResponse
- type UserGetWeeklyChartListResponse
- type UserGetWeeklyTrackChartResponse
Constants ¶
const BaseURL = "https://ws.audioscrobbler.com/2.0/"
BaseURL is the default base URL of the last.fm API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumAddTagsResponse ¶
type AlbumAddTagsResponse struct {
BaseResponse
}
AlbumAddTagsResponse stores the response for album.addTags.
type AlbumGetInfoResponse ¶
type AlbumGetInfoResponse struct {
BaseResponse
Album struct {
Name string `xml:"name"`
Artist string `xml:"artist"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Listeners int64 `xml:"listeners"`
Playcount int64 `xml:"playcount"`
UserPlaycount int64 `xml:"userplaycount"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
URL string `xml:"url"`
Duration int64 `xml:"duration"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
} `xml:"tracks>track"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tags>tag"`
Wiki struct {
Published string `xml:"published"`
Summary string `xml:"summary"`
Content string `xml:"content"`
} `xml:"wiki"`
} `xml:"album"`
}
AlbumGetInfoResponse stores the response for album.getInfo.
type AlbumGetTagsResponse ¶
type AlbumGetTagsResponse struct {
BaseResponse
Tags struct {
Album string `xml:"album,attr"`
Artist string `xml:"artist,attr"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"tags"`
}
AlbumGetTagsResponse stores the response for album.getTags.
type AlbumGetTopTagsResponse ¶
type AlbumGetTopTagsResponse struct {
BaseResponse
TopTags struct {
Album string `xml:"album,attr"`
Artist string `xml:"artist,attr"`
Tags []struct {
Count int64 `xml:"count"`
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"toptags"`
}
AlbumGetTopTagsResponse stores the response for album.getTopTags.
type AlbumRemoveTagResponse ¶
type AlbumRemoveTagResponse struct {
BaseResponse
}
AlbumRemoveTagResponse stores the response for album.removeTag.
type AlbumSearchResponse ¶
type AlbumSearchResponse struct {
BaseResponse
Results struct {
OpenSearchResponse
Albums []struct {
Name string `xml:"name"`
Artist string `xml:"artist"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Streamable int64 `xml:"streamable"`
MBID string `xml:"mbid"`
} `xml:"albummatches>album"`
} `xml:"results"`
}
AlbumSearchResponse stores the response for album.search.
type ArtistAddTagsResponse ¶
type ArtistAddTagsResponse struct {
BaseResponse
}
ArtistAddTagsResponse stores the response for artist.addTags.
type ArtistGetCorrectionResponse ¶
type ArtistGetCorrectionResponse struct {
BaseResponse
Correction struct {
Index int64 `xml:"index,attr"`
Artist struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"artist"`
} `xml:"corrections>correction"`
}
ArtistGetCorrectionResponse stores the response for artist.getCorrection.
type ArtistGetInfoResponse ¶
type ArtistGetInfoResponse struct {
BaseResponse
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Streamable int64 `xml:"streamable"`
Ontour int64 `xml:"ontour"`
Stats struct {
Listeners int64 `xml:"listeners"`
Playcount int64 `xml:"playcount"`
UserPlaycount int64 `xml:"userplaycount"`
} `xml:"stats"`
Artists []struct {
Name string `xml:"name"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"similar>artist"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tags>tag"`
Bio struct {
Link struct {
Href string `xml:"href,attr"`
Rel string `xml:"rel,attr"`
} `xml:"links>link"`
Published string `xml:"published"`
Summary string `xml:"summary"`
Content string `xml:"content"`
} `xml:"bio"`
} `xml:"artist"`
}
ArtistGetInfoResponse stores the response for artist.getInfo.
type ArtistGetSimilarResponse ¶
type ArtistGetSimilarResponse struct {
BaseResponse
SimilarArtists struct {
Artist string `xml:"artist,attr"`
Artists []struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
Match float64 `xml:"match"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Streamable int64 `xml:"streamable"`
} `xml:"artist"`
} `xml:"similarartists"`
}
ArtistGetSimilarResponse stores the response for artist.getSimilar.
type ArtistGetTagsResponse ¶
type ArtistGetTagsResponse struct {
BaseResponse
Tags struct {
Artist string `xml:"artist,attr"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"tags"`
}
ArtistGetTagsResponse stores the response for artist.getTags.
type ArtistGetTopAlbumsResponse ¶
type ArtistGetTopAlbumsResponse struct {
BaseResponse
TopAlbums struct {
PaginationResponse
Artist string `xml:"artist,attr"`
Albums []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"album"`
} `xml:"topalbums"`
}
ArtistGetTopAlbumsResponse stores the response for artist.getTopAlbums.
type ArtistGetTopTagsResponse ¶
type ArtistGetTopTagsResponse struct {
BaseResponse
TopTags struct {
Artist string `xml:"artist,attr"`
Tags []struct {
Count int64 `xml:"count"`
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"toptags"`
}
ArtistGetTopTagsResponse stores the response for artist.getTopTags.
type ArtistGetTopTracksResponse ¶
type ArtistGetTopTracksResponse struct {
BaseResponse
TopTracks struct {
PaginationResponse
Artist string `xml:"artist,attr"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"track"`
} `xml:"toptracks"`
}
ArtistGetTopTracksResponse stores the response for artist.getTopTracks.
type ArtistRemoveTagResponse ¶
type ArtistRemoveTagResponse struct {
BaseResponse
}
ArtistRemoveTagResponse stores the response for artist.removeTag.
type ArtistSearchResponse ¶
type ArtistSearchResponse struct {
BaseResponse
Results struct {
OpenSearchResponse
Artists []struct {
Name string `xml:"name"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artistmatches>artist"`
} `xml:"results"`
}
ArtistSearchResponse stores the response for artist.search.
type AuthGetMobileSessionResponse ¶
type AuthGetMobileSessionResponse struct {
BaseResponse
Session struct {
Name string `xml:"name"`
Key string `xml:"key"`
Subscriber int64 `xml:"subscriber"`
} `xml:"session"`
}
AuthGetMobileSessionResponse stores the response for auth.getMobileSession.
type AuthGetSessionResponse ¶
type AuthGetSessionResponse struct {
BaseResponse
Session struct {
Name string `xml:"name"`
Key string `xml:"key"`
Subscriber int64 `xml:"subscriber"`
} `xml:"session"`
}
AuthGetSessionResponse stores the response for auth.getSession.
type AuthGetTokenResponse ¶
type AuthGetTokenResponse struct {
BaseResponse
Token string `xml:"token"`
}
AuthGetTokenResponse stores the response for auth.getToken.
type BaseResponse ¶
type BaseResponse struct {
Status string `xml:"status,attr"`
Error struct {
Code int64 `xml:"code,attr"`
Message string `xml:",chardata"`
} `xml:"error"`
}
BaseResponse contains fields found in all responses.
type ChartGetTopArtistsResponse ¶
type ChartGetTopArtistsResponse struct {
BaseResponse
Artists struct {
PaginationResponse
Artists []struct {
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
} `xml:"artists"`
}
ChartGetTopArtistsResponse stores the response for chart.getTopArtists.
type ChartGetTopTagsResponse ¶
type ChartGetTopTagsResponse struct {
BaseResponse
Tags struct {
PaginationResponse
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
Reach int64 `xml:"reach"`
Taggings int64 `xml:"taggings"`
Streamable int64 `xml:"streamable"`
Wiki struct{} `xml:"wiki"`
} `xml:"tag"`
} `xml:"tags"`
}
ChartGetTopTagsResponse stores the response for chart.getTopTags.
type ChartGetTopTracksResponse ¶
type ChartGetTopTracksResponse struct {
BaseResponse
Tracks struct {
PaginationResponse
Tracks []struct {
Name string `xml:"name"`
Duration int64 `xml:"duration"`
Playcount int64 `xml:"playcount"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"track"`
} `xml:"tracks"`
}
ChartGetTopTracksResponse stores the response for chart.getTopTracks.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for the last.fm API.
func NewDesktopClient ¶
NewDesktopClient creates a new client prepared for desktop authentication. Requires calling the following methods:
func NewMobileClient ¶
NewMobileClient creates a new client prepared for mobile authentication. Requires calling the following methods:
func NewWebClient ¶
NewWebClient creates a new client prepared for web authentication. Requires calling the following methods:
You must create a server running on callbackURL to catch the token. If callbackURL is an empty string, the default callback URL will be used.
func (Client) AlbumAddTags ¶
func (c Client) AlbumAddTags(params P) (AlbumAddTagsResponse, error)
AlbumAddTags calls the album.addTags endpoint.
func (Client) AlbumGetInfo ¶
func (c Client) AlbumGetInfo(params P) (AlbumGetInfoResponse, error)
AlbumGetInfo calls the album.getInfo endpoint.
func (Client) AlbumGetTags ¶
func (c Client) AlbumGetTags(params P) (AlbumGetTagsResponse, error)
AlbumGetTags calls the album.getTags endpoint.
func (Client) AlbumGetTopTags ¶
func (c Client) AlbumGetTopTags(params P) (AlbumGetTopTagsResponse, error)
AlbumGetTopTags calls the album.getTopTags endpoint.
func (Client) AlbumRemoveTag ¶
func (c Client) AlbumRemoveTag(params P) (AlbumRemoveTagResponse, error)
AlbumRemoveTag calls the album.removeTag endpoint.
func (Client) AlbumSearch ¶
func (c Client) AlbumSearch(params P) (AlbumSearchResponse, error)
AlbumSearch calls the album.search endpoint.
func (Client) ArtistAddTags ¶
func (c Client) ArtistAddTags(params P) (ArtistAddTagsResponse, error)
ArtistAddTags calls the artist.addTags endpoint.
func (Client) ArtistGetCorrection ¶
func (c Client) ArtistGetCorrection(params P) (ArtistGetCorrectionResponse, error)
ArtistGetCorrection calls the artist.getCorrection endpoint.
func (Client) ArtistGetInfo ¶
func (c Client) ArtistGetInfo(params P) (ArtistGetInfoResponse, error)
ArtistGetInfo calls the artist.getInfo endpoint.
func (Client) ArtistGetSimilar ¶
func (c Client) ArtistGetSimilar(params P) (ArtistGetSimilarResponse, error)
ArtistGetSimilar calls the artist.getSimilar endpoint.
func (Client) ArtistGetTags ¶
func (c Client) ArtistGetTags(params P) (ArtistGetTagsResponse, error)
ArtistGetTags calls the artist.getTags endpoint.
func (Client) ArtistGetTopAlbums ¶
func (c Client) ArtistGetTopAlbums(params P) (ArtistGetTopAlbumsResponse, error)
ArtistGetTopAlbums calls the artist.getTopAlbums endpoint.
func (Client) ArtistGetTopTags ¶
func (c Client) ArtistGetTopTags(params P) (ArtistGetTopTagsResponse, error)
ArtistGetTopTags calls the artist.getTopTags endpoint.
func (Client) ArtistGetTopTracks ¶
func (c Client) ArtistGetTopTracks(params P) (ArtistGetTopTracksResponse, error)
ArtistGetTopTracks calls the artist.getTopTracks endpoint.
func (Client) ArtistRemoveTag ¶
func (c Client) ArtistRemoveTag(params P) (ArtistRemoveTagResponse, error)
ArtistRemoveTag calls the artist.removeTag endpoint.
func (Client) ArtistSearch ¶
func (c Client) ArtistSearch(params P) (ArtistSearchResponse, error)
ArtistSearch calls the artist.search endpoint.
func (Client) AuthGetMobileSession ¶
func (c Client) AuthGetMobileSession() (AuthGetMobileSessionResponse, error)
AuthGetMobileSession calls the auth.getMobileSession endpoint. This is the first and only step in the mobile authentication process.
func (Client) AuthGetSession ¶
func (c Client) AuthGetSession(token string) (AuthGetSessionResponse, error)
AuthGetSession calls the auth.getSession endpoint. This is the second step in the web authentication process and the third step in the desktop authentication process.
func (Client) AuthGetToken ¶
func (c Client) AuthGetToken() (AuthGetTokenResponse, error)
AuthGetToken calls the auth.getToken endpoint. This is the first step in the desktop authentication process.
func (Client) ChartGetTopArtists ¶
func (c Client) ChartGetTopArtists(params P) (ChartGetTopArtistsResponse, error)
ChartGetTopArtists calls the chart.getTopArtists endpoint.
func (Client) ChartGetTopTags ¶
func (c Client) ChartGetTopTags(params P) (ChartGetTopTagsResponse, error)
ChartGetTopTags calls the chart.getTopTags endpoint.
func (Client) ChartGetTopTracks ¶
func (c Client) ChartGetTopTracks(params P) (ChartGetTopTracksResponse, error)
ChartGetTopTracks calls the chart.getTopTracks endpoint.
func (Client) DesktopAuthorizationURL ¶
DesktopAuthorizationURL generates a URL to request authorization from the user. This is the second step in the desktop authentication process.
func (Client) GeoGetTopArtists ¶
func (c Client) GeoGetTopArtists(params P) (GeoGetTopArtistsResponse, error)
GeoGetTopArtists calls the geo.getTopArtists endpoint.
func (Client) GeoGetTopTracks ¶
func (c Client) GeoGetTopTracks(params P) (GeoGetTopTracksResponse, error)
GeoGetTopTracks calls the geo.getTopTracks endpoint.
func (Client) LibraryGetArtists ¶
func (c Client) LibraryGetArtists(params P) (LibraryGetArtistsResponse, error)
LibraryGetArtists calls the library.getArtists endpoint.
func (Client) TagGetInfo ¶
func (c Client) TagGetInfo(params P) (TagGetInfoResponse, error)
TagGetInfo calls the tag.getInfo endpoint.
func (Client) TagGetSimilar ¶
func (c Client) TagGetSimilar(params P) (TagGetSimilarResponse, error)
TagGetSimilar calls the tag.getSimilar endpoint.
func (Client) TagGetTopAlbums ¶
func (c Client) TagGetTopAlbums(params P) (TagGetTopAlbumsResponse, error)
TagGetTopAlbums calls the tag.getTopAlbums endpoint.
func (Client) TagGetTopArtists ¶
func (c Client) TagGetTopArtists(params P) (TagGetTopArtistsResponse, error)
TagGetTopArtists calls the tag.getTopArtists endpoint.
func (Client) TagGetTopTags ¶
func (c Client) TagGetTopTags(params P) (TagGetTopTagsResponse, error)
TagGetTopTags calls the tag.getTopTags endpoint.
func (Client) TagGetTopTracks ¶
func (c Client) TagGetTopTracks(params P) (TagGetTopTracksResponse, error)
TagGetTopTracks calls the tag.getTopTracks endpoint.
func (Client) TagGetWeeklyChartList ¶
func (c Client) TagGetWeeklyChartList(params P) (TagGetWeeklyChartListResponse, error)
TagGetWeeklyChartList calls the tag.getWeeklyChartList endpoint.
func (Client) TrackAddTags ¶
func (c Client) TrackAddTags(params P) (TrackAddTagsResponse, error)
TrackAddTags calls the track.addTags endpoint.
func (Client) TrackGetCorrection ¶
func (c Client) TrackGetCorrection(params P) (TrackGetCorrectionResponse, error)
TrackGetCorrection calls the track.getCorrection endpoint.
func (Client) TrackGetInfo ¶
func (c Client) TrackGetInfo(params P) (TrackGetInfoResponse, error)
TrackGetInfo calls the track.getInfo endpoint.
func (Client) TrackGetSimilar ¶
func (c Client) TrackGetSimilar(params P) (TrackGetSimilarResponse, error)
TrackGetSimilar calls the track.getSimilar endpoint.
func (Client) TrackGetTags ¶
func (c Client) TrackGetTags(params P) (TrackGetTagsResponse, error)
TrackGetTags calls the track.getTags endpoint.
func (Client) TrackGetTopTags ¶
func (c Client) TrackGetTopTags(params P) (TrackGetTopTagsResponse, error)
TrackGetTopTags calls the track.getTopTags endpoint.
func (Client) TrackLove ¶
func (c Client) TrackLove(params P) (TrackLoveResponse, error)
TrackLove calls the track.love endpoint.
func (Client) TrackRemoveTag ¶
func (c Client) TrackRemoveTag(params P) (TrackRemoveTagResponse, error)
TrackRemoveTag calls the track.removeTag endpoint.
func (Client) TrackScrobble ¶
func (c Client) TrackScrobble(params P) (TrackScrobbleResponse, error)
TrackScrobble calls the track.scrobble endpoint.
func (Client) TrackSearch ¶
func (c Client) TrackSearch(params P) (TrackSearchResponse, error)
TrackSearch calls the track.search endpoint.
func (Client) TrackUnlove ¶
func (c Client) TrackUnlove(params P) (TrackUnloveResponse, error)
TrackUnlove calls the track.unlove endpoint.
func (Client) TrackUpdateNowPlaying ¶
func (c Client) TrackUpdateNowPlaying(params P) (TrackUpdateNowPlayingResponse, error)
TrackUpdateNowPlaying calls the track.updateNowPlaying endpoint.
func (Client) UserGetFriends ¶
func (c Client) UserGetFriends(params P) (UserGetFriendsResponse, error)
UserGetFriends calls the user.getFriends endpoint.
func (Client) UserGetInfo ¶
func (c Client) UserGetInfo(params P) (UserGetInfoResponse, error)
UserGetInfo calls the user.getInfo endpoint.
func (Client) UserGetLovedTracks ¶
func (c Client) UserGetLovedTracks(params P) (UserGetLovedTracksResponse, error)
UserGetLovedTracks calls the user.getLovedTracks endpoint.
func (Client) UserGetPersonalTags ¶
func (c Client) UserGetPersonalTags(params P) (UserGetPersonalTagsResponse, error)
UserGetPersonalTags calls the user.getPersonalTags endpoint.
func (Client) UserGetRecentTracks ¶
func (c Client) UserGetRecentTracks(params P) (UserGetRecentTracksResponse, error)
UserGetRecentTracks calls the user.getRecentTracks endpoint.
func (Client) UserGetTopAlbums ¶
func (c Client) UserGetTopAlbums(params P) (UserGetTopAlbumsResponse, error)
UserGetTopAlbums calls the user.getTopAlbums endpoint.
func (Client) UserGetTopArtists ¶
func (c Client) UserGetTopArtists(params P) (UserGetTopArtistsResponse, error)
UserGetTopArtists calls the user.getTopArtists endpoint.
func (Client) UserGetTopTags ¶
func (c Client) UserGetTopTags(params P) (UserGetTopTagsResponse, error)
UserGetTopTags calls the user.getTopTags endpoint.
func (Client) UserGetTopTracks ¶
func (c Client) UserGetTopTracks(params P) (UserGetTopTracksResponse, error)
UserGetTopTracks calls the user.getTopTracks endpoint.
func (Client) UserGetWeeklyAlbumChart ¶
func (c Client) UserGetWeeklyAlbumChart(params P) (UserGetWeeklyAlbumChartResponse, error)
UserGetWeeklyAlbumChart calls the user.getWeeklyAlbumChart endpoint.
func (Client) UserGetWeeklyArtistChart ¶
func (c Client) UserGetWeeklyArtistChart(params P) (UserGetWeeklyArtistChartResponse, error)
UserGetWeeklyArtistChart calls the user.getWeeklyArtistChart endpoint.
func (Client) UserGetWeeklyChartList ¶
func (c Client) UserGetWeeklyChartList(params P) (UserGetWeeklyChartListResponse, error)
UserGetWeeklyChartList calls the user.getWeeklyChartList endpoint.
func (Client) UserGetWeeklyTrackChart ¶
func (c Client) UserGetWeeklyTrackChart(params P) (UserGetWeeklyTrackChartResponse, error)
UserGetWeeklyTrackChart calls the user.getWeeklyTrackChart endpoint.
func (Client) WebAuthorizationURL ¶
WebAuthorizationURL generates a URL to request authorization from the user. This is the first step in the web authentication process.
type GeoGetTopArtistsResponse ¶
type GeoGetTopArtistsResponse struct {
BaseResponse
TopArtists struct {
PaginationResponse
Country string `xml:"country,attr"`
Artists []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
} `xml:"topartists"`
}
GeoGetTopArtistsResponse stores the response for geo.getTopArtists.
type GeoGetTopTracksResponse ¶
type GeoGetTopTracksResponse struct {
BaseResponse
Tracks struct {
PaginationResponse
Country string `xml:"country,attr"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Duration int64 `xml:"duration"`
Listeners int64 `xml:"listeners"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"track"`
} `xml:"tracks"`
}
GeoGetTopTracksResponse stores the response for geo.getTopTracks.
type LibraryGetArtistsResponse ¶
type LibraryGetArtistsResponse struct {
BaseResponse
Artists struct {
PaginationResponse
User string `xml:"user,attr"`
Artists []struct {
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
Tagcount int64 `xml:"tagcount"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
} `xml:"artists"`
}
LibraryGetArtistsResponse stores the response for library.getArtists.
type OpenSearchResponse ¶
type OpenSearchResponse struct {
For string `xml:"for,attr"`
Query struct {
Role string `xml:"role,attr"`
SearchTerms string `xml:"searchTerms,attr"`
StartPage int64 `xml:"startPage,attr"`
} `xml:"Query"`
TotalResults int64 `xml:"totalResults"`
StartIndex int64 `xml:"startIndex"`
ItemsPerPage int64 `xml:"itemsPerPage"`
}
OpenSearchResponse contains fields found in OpenSearch query responses.
type PaginationResponse ¶
type PaginationResponse struct {
Page int64 `xml:"page,attr"`
PerPage int64 `xml:"perPage,attr"`
Total int64 `xml:"total,attr"`
TotalPages int64 `xml:"totalPages,attr"`
}
PaginationResponse contains fields found in paginated responses.
type TagGetInfoResponse ¶
type TagGetInfoResponse struct {
BaseResponse
Tag struct {
Name string `xml:"name"`
Total int64 `xml:"total"`
Reach int64 `xml:"reach"`
Wiki struct {
Summary string `xml:"summary"`
Content string `xml:"content"`
} `xml:"wiki"`
} `xml:"tag"`
}
TagGetInfoResponse stores the response for tag.getInfo.
type TagGetSimilarResponse ¶
type TagGetSimilarResponse struct {
BaseResponse
SimilarTags struct{} `xml:"similartags"`
}
TagGetSimilarResponse stores the response for tag.getSimilar.
type TagGetTopAlbumsResponse ¶
type TagGetTopAlbumsResponse struct {
BaseResponse
Albums struct {
PaginationResponse
Tag string `xml:"tag,attr"`
Albums []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"album"`
} `xml:"albums"`
}
TagGetTopAlbumsResponse stores the response for tag.getTopAlbums.
type TagGetTopArtistsResponse ¶
type TagGetTopArtistsResponse struct {
BaseResponse
TopArtists struct {
PaginationResponse
Tag string `xml:"tag,attr"`
Artists []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
} `xml:"topartists"`
}
TagGetTopArtistsResponse stores the response for tag.getTopArtists.
type TagGetTopTagsResponse ¶
type TagGetTopTagsResponse struct {
BaseResponse
TopTags struct {
NumRes int64 `xml:"num_res,attr"`
Offset int64 `xml:"offset,attr"`
Total int64 `xml:"total,attr"`
Tags []struct {
Name string `xml:"name"`
Count int64 `xml:"count"`
Reach int64 `xml:"reach"`
} `xml:"tag"`
} `xml:"toptags"`
}
TagGetTopTagsResponse stores the response for tag.getTopTags.
type TagGetTopTracksResponse ¶
type TagGetTopTracksResponse struct {
BaseResponse
Tracks struct {
PaginationResponse
Tag string `xml:"tag,attr"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Duration int64 `xml:"duration"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
MBID string `xml:"mbid"`
} `xml:"track"`
} `xml:"tracks"`
}
TagGetTopTracksResponse stores the response for tag.getTopTracks.
type TagGetWeeklyChartListResponse ¶
type TagGetWeeklyChartListResponse struct {
BaseResponse
Weeklychartlist struct {
Tag string `xml:"tag,attr"`
Charts []struct {
From int64 `xml:"from,attr"`
To int64 `xml:"to,attr"`
} `xml:"chart"`
} `xml:"weeklychartlist"`
}
TagGetWeeklyChartListResponse stores the response for tag.getWeeklyChartList.
type TrackAddTagsResponse ¶
type TrackAddTagsResponse struct {
BaseResponse
}
TrackAddTagsResponse stores the response for track.addTags.
type TrackGetCorrectionResponse ¶
type TrackGetCorrectionResponse struct {
BaseResponse
Correction struct {
ArtistCorrected int64 `xml:"artistcorrected,attr"`
Index int64 `xml:"index,attr"`
TrackCorrected int64 `xml:"trackcorrected,attr"`
Track struct {
Name string `xml:"name"`
URL string `xml:"url"`
Artist struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"artist"`
} `xml:"track"`
} `xml:"corrections>correction"`
}
TrackGetCorrectionResponse stores the response for track.getCorrection.
type TrackGetInfoResponse ¶
type TrackGetInfoResponse struct {
BaseResponse
Track struct {
Name string `xml:"name"`
URL string `xml:"url"`
Duration int64 `xml:"duration"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Listeners int64 `xml:"listeners"`
Playcount int64 `xml:"playcount"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Album struct {
Artist string `xml:"artist"`
Title string `xml:"title"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"album"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"toptags>tag"`
Wiki struct {
Published string `xml:"published"`
Summary string `xml:"summary"`
Content string `xml:"content"`
} `xml:"wiki"`
} `xml:"track"`
}
TrackGetInfoResponse stores the response for track.getInfo.
type TrackGetSimilarResponse ¶
type TrackGetSimilarResponse struct {
BaseResponse
SimilarTracks struct {
Artist string `xml:"artist,attr"`
Track string `xml:"track,attr"`
Tracks []struct {
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
Match float64 `xml:"match"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Duration int64 `xml:"duration"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
MBID string `xml:"mbid"`
} `xml:"track"`
} `xml:"similartracks"`
}
TrackGetSimilarResponse stores the response for track.getSimilar.
type TrackGetTagsResponse ¶
type TrackGetTagsResponse struct {
BaseResponse
Tags struct {
Artist string `xml:"artist,attr"`
Track string `xml:"track,attr"`
Tags []struct {
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"tags"`
}
TrackGetTagsResponse stores the response for track.getTags.
type TrackGetTopTagsResponse ¶
type TrackGetTopTagsResponse struct {
BaseResponse
TopTags struct {
Artist string `xml:"artist,attr"`
Track string `xml:"track,attr"`
Tags []struct {
Count int64 `xml:"count"`
Name string `xml:"name"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"toptags"`
}
TrackGetTopTagsResponse stores the response for track.getTopTags.
type TrackLoveResponse ¶
type TrackLoveResponse struct {
BaseResponse
}
TrackLoveResponse stores the response for track.love.
type TrackRemoveTagResponse ¶
type TrackRemoveTagResponse struct {
BaseResponse
}
TrackRemoveTagResponse stores the response for track.removeTag.
type TrackScrobbleResponse ¶
type TrackScrobbleResponse struct {
BaseResponse
Scrobbles struct {
Accepted int64 `xml:"accepted,attr"`
Ignored int64 `xml:"ignored,attr"`
Scrobbles []struct {
Track struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"track"`
Artist struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Album struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"album"`
AlbumArtist struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"albumArtist"`
Timestamp int64 `xml:"timestamp"`
IgnoredMessage struct {
Code int64 `xml:"code,attr"`
Message string `xml:",chardata"`
} `xml:"ignoredMessage"`
} `xml:"scrobble"`
} `xml:"scrobbles"`
}
TrackScrobbleResponse stores the response for track.scrobble.
type TrackSearchResponse ¶
type TrackSearchResponse struct {
BaseResponse
Results struct {
OpenSearchResponse
ItemsPerPage int64 `xml:"itemsPerPage"`
Tracks []struct {
Name string `xml:"name"`
Artist string `xml:"artist"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Listeners int64 `xml:"listeners"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
MBID string `xml:"mbid"`
} `xml:"trackmatches>track"`
} `xml:"results"`
}
TrackSearchResponse stores the response for track.search.
type TrackUnloveResponse ¶
type TrackUnloveResponse struct {
BaseResponse
}
TrackUnloveResponse stores the response for track.unlove.
type TrackUpdateNowPlayingResponse ¶
type TrackUpdateNowPlayingResponse struct {
BaseResponse
Nowplaying struct {
Track struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"track"`
Artist struct {
Corrected int64 `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Album struct {
Corrected int64 `xml:"corrected,attr"`
} `xml:"album"`
AlbumArtist struct {
Corrected int64 `xml:"corrected,attr"`
} `xml:"albumArtist"`
IgnoredMessage struct {
Code int64 `xml:"code,attr"`
Message string `xml:",chardata"`
} `xml:"ignoredMessage"`
} `xml:"nowplaying"`
}
TrackUpdateNowPlayingResponse stores the response for track.updateNowPlaying.
type UserGetFriendsResponse ¶
type UserGetFriendsResponse struct {
BaseResponse
Friends struct {
PaginationResponse
User string `xml:"user,attr"`
Users []struct {
Name string `xml:"name"`
RealName string `xml:"realname"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
URL string `xml:"url"`
Country string `xml:"country"`
Subscriber int64 `xml:"subscriber"`
Playcount int64 `xml:"playcount"`
Playlists int64 `xml:"playlists"`
Bootstrap int64 `xml:"bootstrap"`
Registered struct {
UnixTime int64 `xml:"unixtime,attr"`
Time string `xml:",chardata"`
} `xml:"registered"`
Type string `xml:"type"`
} `xml:"user"`
} `xml:"friends"`
}
UserGetFriendsResponse stores the response for user.getFriends.
type UserGetInfoResponse ¶
type UserGetInfoResponse struct {
BaseResponse
User struct {
Name string `xml:"name"`
RealName string `xml:"realname"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
URL string `xml:"url"`
Country string `xml:"country"`
Age int64 `xml:"age"`
Gender string `xml:"gender"`
Subscriber int64 `xml:"subscriber"`
Playcount int64 `xml:"playcount"`
Playlists int64 `xml:"playlists"`
Bootstrap int64 `xml:"bootstrap"`
Registered struct {
UnixTime int64 `xml:"unixtime,attr"`
Time string `xml:",chardata"`
} `xml:"registered"`
Type string `xml:"type"`
ArtistCount int64 `xml:"artist_count"`
AlbumCount int64 `xml:"album_count"`
TrackCount int64 `xml:"track_count"`
} `xml:"user"`
}
UserGetInfoResponse stores the response for user.getInfo.
type UserGetLovedTracksResponse ¶
type UserGetLovedTracksResponse struct {
BaseResponse
Lovedtracks struct {
PaginationResponse
User string `xml:"user,attr"`
Tracks []struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Date struct {
UTS int64 `xml:"uts,attr"`
Time string `xml:",chardata"`
} `xml:"date"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
} `xml:"track"`
} `xml:"lovedtracks"`
}
UserGetLovedTracksResponse stores the response for user.getLovedTracks.
type UserGetPersonalTagsResponse ¶
type UserGetPersonalTagsResponse struct {
BaseResponse
Taggings struct {
PaginationResponse
Tag string `xml:"tag,attr"`
User string `xml:"user,attr"`
Albums []struct {
Name string `xml:"name"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
Artist struct {
Name string `xml:"name"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"albums>album"`
Artists []struct {
Name string `xml:"name"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artists>artist"`
Tracks []struct {
Name string `xml:"name"`
Duration string `xml:"duration"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"tracks>track"`
} `xml:"taggings"`
}
UserGetPersonalTagsResponse stores the response for user.getPersonalTags.
type UserGetRecentTracksResponse ¶
type UserGetRecentTracksResponse struct {
BaseResponse
RecentTracks struct {
PaginationResponse
User string `xml:"user,attr"`
Tracks []struct {
Artist struct {
Name string `xml:"name"`
MBID struct{} `xml:"mbid"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
Loved int64 `xml:"loved"`
Name string `xml:"name"`
Streamable int64 `xml:"streamable"`
MBID string `xml:"mbid"`
Album struct {
MBID string `xml:"mbid,attr"`
Name string `xml:",chardata"`
} `xml:"album"`
URL string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
Date struct {
UTS int64 `xml:"uts,attr"`
Time string `xml:",chardata"`
} `xml:"date"`
} `xml:"track"`
} `xml:"recenttracks"`
}
UserGetRecentTracksResponse stores the response for user.getRecentTracks.
type UserGetTopAlbumsResponse ¶
type UserGetTopAlbumsResponse struct {
BaseResponse
TopAlbums struct {
PaginationResponse
User string `xml:"user,attr"`
Albums []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"album"`
} `xml:"topalbums"`
}
UserGetTopAlbumsResponse stores the response for user.getTopAlbums.
type UserGetTopArtistsResponse ¶
type UserGetTopArtistsResponse struct {
BaseResponse
TopArtists struct {
PaginationResponse
User string `xml:"user,attr"`
Artists []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Playcount int64 `xml:"playcount"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable int64 `xml:"streamable"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"artist"`
} `xml:"topartists"`
}
UserGetTopArtistsResponse stores the response for user.getTopArtists.
type UserGetTopTagsResponse ¶
type UserGetTopTagsResponse struct {
BaseResponse
TopTags struct {
User string `xml:"user,attr"`
Tags []struct {
Name string `xml:"name"`
Count int64 `xml:"count"`
URL string `xml:"url"`
} `xml:"tag"`
} `xml:"toptags"`
}
UserGetTopTagsResponse stores the response for user.getTopTags.
type UserGetTopTracksResponse ¶
type UserGetTopTracksResponse struct {
BaseResponse
TopTracks struct {
PaginationResponse
User string `xml:"user,attr"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
Duration int64 `xml:"duration"`
Playcount int64 `xml:"playcount"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
Streamable struct {
FullTrack int64 `xml:"fulltrack,attr"`
Streamable int64 `xml:",chardata"`
} `xml:"streamable"`
Artist struct {
Name string `xml:"name"`
MBID string `xml:"mbid"`
URL string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
} `xml:"track"`
} `xml:"toptracks"`
}
UserGetTopTracksResponse stores the response for user.getTopTracks.
type UserGetWeeklyAlbumChartResponse ¶
type UserGetWeeklyAlbumChartResponse struct {
BaseResponse
WeeklyAlbumChart struct {
From int64 `xml:"from,attr"`
To int64 `xml:"to,attr"`
User string `xml:"user,attr"`
Albums []struct {
Rank int64 `xml:"rank,attr"`
Artist struct {
MBID string `xml:"mbid,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Name string `xml:"name"`
MBID string `xml:"mbid"`
Playcount int64 `xml:"playcount"`
URL string `xml:"url"`
} `xml:"album"`
} `xml:"weeklyalbumchart"`
}
UserGetWeeklyAlbumChartResponse stores the response for user.getWeeklyAlbumChart.
type UserGetWeeklyArtistChartResponse ¶
type UserGetWeeklyArtistChartResponse struct {
BaseResponse
WeeklyArtistChart struct {
From int64 `xml:"from,attr"`
To int64 `xml:"to,attr"`
User string `xml:"user,attr"`
Artists []struct {
Rank int64 `xml:"rank,attr"`
Name string `xml:"name"`
MBID string `xml:"mbid"`
Playcount int64 `xml:"playcount"`
URL string `xml:"url"`
} `xml:"artist"`
} `xml:"weeklyartistchart"`
}
UserGetWeeklyArtistChartResponse stores the response for user.getWeeklyArtistChart.
type UserGetWeeklyChartListResponse ¶
type UserGetWeeklyChartListResponse struct {
BaseResponse
Weeklychartlist struct {
User string `xml:"user,attr"`
Charts []struct {
From int64 `xml:"from,attr"`
To int64 `xml:"to,attr"`
} `xml:"chart"`
} `xml:"weeklychartlist"`
}
UserGetWeeklyChartListResponse stores the response for user.getWeeklyChartList.
type UserGetWeeklyTrackChartResponse ¶
type UserGetWeeklyTrackChartResponse struct {
BaseResponse
WeeklyTrackChart struct {
From int64 `xml:"from,attr"`
To int64 `xml:"to,attr"`
User string `xml:"user,attr"`
Tracks []struct {
Rank int64 `xml:"rank,attr"`
Artist struct {
MBID string `xml:"mbid,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Name string `xml:"name"`
MBID string `xml:"mbid"`
Playcount int64 `xml:"playcount"`
Images []struct {
Size string `xml:"size,attr"`
URL string `xml:",chardata"`
} `xml:"image"`
URL string `xml:"url"`
} `xml:"track"`
} `xml:"weeklytrackchart"`
}
UserGetWeeklyTrackChartResponse stores the response for user.getWeeklyTrackChart.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
api_error
command
|
|
|
desktop_auth
command
|
|
|
geo
command
|
|
|
mobile_auth
command
|
|
|
musicbrainz
command
|
|
|
scrobble
command
|
|
|
web_auth
command
|
|
|
Package internal provides basic functions for building last.fm API requests.
|
Package internal provides basic functions for building last.fm API requests. |