Documentation
¶
Overview ¶
lastfm package is used to communicate with the scrobbler API on Last.fm
Using docs from https://www.last.fm/api/
Index ¶
- type Album
- type AlbumArtist
- type AlbumAttr
- type AlbumMatches
- type AlbumPersonalTag
- type AlbumPersonalTags
- type AlbumRanked
- type AlbumRecent
- type AlbumSearchRes
- type AlbumTopTags
- type AlbumTracks
- type Artist
- type ArtistAlbums
- type ArtistAttr
- type ArtistMatches
- type ArtistPersonalTag
- type ArtistPersonalTags
- type ArtistRanked
- type ArtistRecent
- type ArtistSearchRes
- type ArtistStats
- type ArtistTagAttr
- type ArtistTrackAttr
- type Artists
- type BareArtist
- type Binary
- type Bio
- type ChartArtist
- type ChartAttr
- type ChartDates
- type ChartTag
- type ChartTrack
- type ChartTracks
- type Client
- func (c *Client) AlbumGetInfo(album, artist string, opts ...RequestOption) (FullAlbum, error)
- func (c *Client) AlbumGetTopTags(album, artist string, opts ...RequestOption) (AlbumTopTags, error)
- func (c *Client) AlbumSearch(album string, opts ...RequestOption) (AlbumSearchRes, error)
- func (c *Client) ArtistGetInfo(artist string, opts ...RequestOption) (FullArtist, error)
- func (c *Client) ArtistGetSimilar(artist string, opts ...RequestOption) (SimilarArtists, error)
- func (c *Client) ArtistGetTopAlbums(artist string, opts ...RequestOption) (ArtistAlbums, error)
- func (c *Client) ArtistGetTopTags(artist string, opts ...RequestOption) (TagsWithCount, error)
- func (c *Client) ArtistGetTopTracks(artist string, opts ...RequestOption) (Tracks, error)
- func (c *Client) ArtistSearch(artist string, opts ...RequestOption) (ArtistSearchRes, error)
- func (c *Client) ChartGetTopArtists(opts ...RequestOption) (TopArtists, error)
- func (c *Client) ChartGetTopTags(opts ...RequestOption) (TopTags, error)
- func (c *Client) ChartGetTopTracks(opts ...RequestOption) (ChartTracks, error)
- func (c *Client) GeoGetTopArtists(country string, opts ...RequestOption) (GeoTopArtists, error)
- func (c *Client) GeoGetTopTracks(country string, opts ...RequestOption) (GeoTopTracks, error)
- func (c *Client) LibraryGetArtists(user string, opts ...RequestOption) (LibraryArtists, error)
- func (c *Client) SetUser(user string) error
- func (c *Client) TagGetInfo(tag string, opts ...RequestOption) (TagInfo, error)
- func (c *Client) TagGetTopAlbums(tag string, opts ...RequestOption) (TagTopAlbums, error)
- func (c *Client) TagGetTopArtists(tag string, opts ...RequestOption) (TagTopArtists, error)
- func (c *Client) TagGetTopTags() (TagTopTags, error)
- func (c *Client) TagGetTopTracks(tag string, opts ...RequestOption) (TagTopTracks, error)
- func (c *Client) TagGetWeeklyChartlist(tag string) (TagWeeklyChartlist, error)
- func (c *Client) TrackGetCorrection(track, artist string) (TrackCorrection, error)
- func (c *Client) TrackGetInfo(track, artist string, opts ...RequestOption) (TrackInfo, error)
- func (c *Client) TrackGetSimilar(track, artist string, opts ...RequestOption) (SimilarTracks, error)
- func (c *Client) TrackGetTags(artist, track, user string, opts ...RequestOption) (TrackTags, error)
- func (c *Client) TrackGetTopTags(artist, track, user string, opts ...RequestOption) (TrackTopTags, error)
- func (c *Client) TrackSearch(track string, opts ...RequestOption) (TrackSearchRes, error)
- func (c *Client) UserGetFriends(user string, opts ...RequestOption) (UserFriends, error)
- func (c *Client) UserGetInfo(user string) (User, error)
- func (c *Client) UserGetLovedTracks(user string, opts ...RequestOption) (UserLovedTracks, error)
- func (c *Client) UserGetPersonalAlbumTags(user, tag string, opts ...RequestOption) (AlbumPersonalTags, error)
- func (c *Client) UserGetPersonalArtistTags(user, tag string, opts ...RequestOption) (ArtistPersonalTags, error)
- func (c *Client) UserGetPersonalTrackTags(user, tag string, opts ...RequestOption) (TrackPersonalTags, error)
- func (c *Client) UserGetRecentTracks(user string, opts ...RequestOption) (UserRecentTracks, error)
- func (c *Client) UserGetTopAlbums(user string, opts ...RequestOption) (UserTopAlbums, error)
- func (c *Client) UserGetTopArtists(user string, opts ...RequestOption) (UserTopArtists, error)
- func (c *Client) UserGetTopTags(user string, opts ...RequestOption) (UserTopTags, error)
- func (c *Client) UserGetTopTracks(user string, opts ...RequestOption) (UserTopTracks, error)
- func (c *Client) UserGetWeeklyAlbumChart(user string, opts ...RequestOption) (UserWeeklyAlbumChart, error)
- func (c *Client) UserGetWeeklyArtistChart(user string, opts ...RequestOption) (UserWeeklyArtistChart, error)
- func (c *Client) UserGetWeeklyChartList(user string) (UserWeeklyChartList, error)
- func (c *Client) UserGetWeeklyTrackChart(user string, opts ...RequestOption) (UserWeeklyTrackChart, error)
- type CorrectedAttr
- type CorrectedTrack
- type Error
- type FullAlbum
- type FullArtist
- type GeoAttr
- type GeoTopArtists
- type GeoTopTracks
- type GeoTrack
- type Image
- type LibraryArtist
- type LibraryArtists
- type Link
- type Links
- type LovedTrack
- type OpenSearchQuery
- type PathOptions
- type PersonalTagAttr
- type PersonalTrack
- type PosAttr
- type Rank
- type RecentDate
- type RequestOption
- func AlbumOpt(album string) RequestOption
- func ArtistOpt(artist string) RequestOption
- func AutocorrectOpt(autocorrect Binary) RequestOption
- func CountryOpt(code string) RequestOption
- func ExtendedOpt(extend Binary) RequestOption
- func FromOpt(from int) RequestOption
- func LangOpt(lang string) RequestOption
- func LimitOpt(amount int) RequestOption
- func LocationOpt(local string) RequestOption
- func MbidOpt(id string) RequestOption
- func PageOpt(page int) RequestOption
- func PeriodOpt(period TimePeriod) RequestOption
- func TagOpt(tag string) RequestOption
- func TaggingTypeOpt(tag Tagging) RequestOption
- func ToOpt(to int) RequestOption
- func TrackOpt(track string) RequestOption
- func UsernameOpt(user string) RequestOption
- type SearchAttr
- type SimilarArtists
- type SimilarTrack
- type SimilarTracks
- type SimpleAlbum
- type SimpleArtistAttr
- type StreamableTrack
- type Tag
- type TagAlbum
- type TagArtist
- type TagAttr
- type TagChartAttr
- type TagChartlist
- type TagInfo
- type TagTopAlbums
- type TagTopArtists
- type TagTopTags
- type TagTopTracks
- type TagTrack
- type TagWeeklyChartlist
- type TagWithCount
- type TagWithStrCount
- type Tagging
- type Tags
- type TagsWithCount
- type TimePeriod
- type TopArtists
- type TopTag
- type TopTagAttr
- type TopTags
- type Track
- type TrackAlbum
- type TrackCorrection
- type TrackDate
- type TrackInfo
- type TrackInfoAlbum
- type TrackMatch
- type TrackMatches
- type TrackPersonalTag
- type TrackPersonalTags
- type TrackRank
- type TrackRankInt
- type TrackRanked
- type TrackRecent
- type TrackSearchRes
- type TrackTags
- type TrackTopTags
- type Tracks
- type User
- type UserAttr
- type UserAttrSimple
- type UserFriend
- type UserFriends
- type UserLovedTracks
- type UserRecentTracks
- type UserRegistered
- type UserRegisteredStr
- type UserTopAlbums
- type UserTopArtists
- type UserTopTags
- type UserTopTracks
- type UserWeeklyAlbumChart
- type UserWeeklyArtistChart
- type UserWeeklyChartList
- type UserWeeklyTrackChart
- type WeeklyAlbumChart
- type WeeklyArtistChart
- type WeeklyAttr
- type WeeklyTrackChart
- type Wiki
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct {
Name string `json:"name"`
Playcount int `json:"playcount"`
MBID string `json:"mbid"`
URL string `json:"url"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr ArtistAttr `json:"@attr"`
}
Album struct
type AlbumArtist ¶
type AlbumArtist struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
}
AlbumArtist ...
type AlbumMatches ¶
type AlbumMatches struct {
Album []SimpleAlbum `json:"album"`
}
AlbumMatches ...
type AlbumPersonalTag ¶
type AlbumPersonalTag struct {
Albums []Album `json:"album"`
}
AlbumPersonalTag ...
type AlbumPersonalTags ¶
type AlbumPersonalTags struct {
AlbumTags AlbumPersonalTag `json:"albums"`
Attr PersonalTagAttr `json:"@attr"`
}
AlbumPersonalTags ...
type AlbumRanked ¶
type AlbumRanked struct {
Name string `json:"name"`
Playcount string `json:"playcount"`
MBID string `json:"mbid"`
URL string `json:"url"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr Rank `json:"@attr"`
}
AlbumRanked ...
type AlbumRecent ¶
AlbumRecent ...
type AlbumSearchRes ¶
type AlbumSearchRes struct {
Query OpenSearchQuery `json:"opensearch:Query"`
QueryTotalResults string `json:"opensearch:totalResults"`
QueryStartIndex string `json:"opensearch:startIndex"`
QueryItemsPerPage string `json:"opensearch:itemsPerPage"`
AlbumMatches AlbumMatches `json:"albummatches"`
Attr SearchAttr `json:"@attr"`
}
AlbumSearchRes ...
type AlbumTopTags ¶
type AlbumTopTags struct {
Tag []TagWithCount `json:"tag"`
Attr AlbumAttr `json:"@attr"`
}
AlbumTopTags ...
type Artist ¶
type Artist struct {
Name string `json:"name"`
Listeners string `json:"listeners"`
MBID string `json:"mbid"`
Match string `json:"match,omitempty"`
URL string `json:"url"`
Image []Image `json:"image"`
Streamable string `json:"streamable"`
}
Artist ...
type ArtistAlbums ¶
type ArtistAlbums struct {
Album []Album `json:"album"`
Attr ArtistAttr `json:"@attr"`
}
ArtistAlbums ...
type ArtistAttr ¶
type ArtistAttr struct {
Artist string `json:"artist"`
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
ArtistAttr ...
type ArtistMatches ¶
type ArtistMatches struct {
Artist []Artist `json:"artist"`
}
ArtistMatches ...
type ArtistPersonalTag ¶
type ArtistPersonalTag struct {
Artists []Artist `json:"artist"`
}
ArtistPersonalTag ...
type ArtistPersonalTags ¶
type ArtistPersonalTags struct {
ArtistTags ArtistPersonalTag `json:"artists"`
Attr PersonalTagAttr `json:"@attr"`
}
ArtistPersonalTags ...
type ArtistRanked ¶
type ArtistRanked struct {
Streamable string `json:"streamable"`
Image []Image `json:"image"`
MBID string `json:"mbid"`
URL string `json:"url"`
Playcount string `json:"playcount"`
Attr Rank `json:"@attr"`
Name string `json:"name"`
}
ArtistRanked ...
type ArtistRecent ¶
type ArtistRecent struct {
MBID string `json:"mbid"`
Text string `json:"#text,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
Image []Image `json:"image,omitempty"`
}
ArtistRecent ...
type ArtistSearchRes ¶
type ArtistSearchRes struct {
Query OpenSearchQuery `json:"opensearch:Query"`
QueryTotalResults string `json:"opensearch:totalResults"`
QueryStartIndex string `json:"opensearch:startIndex"`
QueryItemsPerPage string `json:"opensearch:itemsPerPage"`
ArtistMatches ArtistMatches `json:"artistmatches"`
Attr SearchAttr `json:"@attr"`
}
ArtistSearchRes ...
type ArtistStats ¶
Artist Stats identifies stats associated with an artist
type ArtistTrackAttr ¶
ArtistTrackAttr ...
type BareArtist ¶
type BareArtist struct {
Name string `json:"name"`
URL string `json:"url"`
Image []Image `json:"image"`
}
BareArtist ...
type Bio ¶
type Bio struct {
Links Links `json:"links"`
Published string `json:"published"`
Summary string `json:"summary"`
Content string `json:"content"`
}
Bio ...
type ChartArtist ¶
type ChartArtist struct {
Name string `json:"name"`
Playcount string `json:"playcount"`
Listeners string `json:"listeners"`
MBID string `json:"mbid"`
URL string `json:"url"`
Streamable string `json:"streamable"`
Image []Image `json:"image"`
}
ChartArtist ...
type ChartAttr ¶
type ChartAttr struct {
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
ChartAttr ...
type ChartDates ¶
type ChartDates struct {
Text string `json:"#text"`
From string `json:"from"`
To string `json:"to"`
}
ChartDates ...
type ChartTag ¶
type ChartTag struct {
Name string `json:"name"`
URL string `json:"url"`
Reach string `json:"reach"`
Taggings string `json:"taggings"`
Streamable string `json:"streamable"`
Wiki Wiki `json:"wiki"`
}
ChartTag ...
type ChartTrack ¶
type ChartTrack 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 StreamableTrack `json:"streamable"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
}
ChartTrack ...
type ChartTracks ¶
type ChartTracks struct {
Track []ChartTrack `json:"track"`
Attr ChartAttr `json:"@attr"`
}
ChartTracks ...
type Client ¶
type Client struct {
User string
// contains filtered or unexported fields
}
Client is a client for working with the Last.fm Web API **Requires API key and secret for now, until auth.go is set up
func New ¶
New returns a client for working with the Spotify Web API. The provided httpClient must provide Authentication with the requests. The auth package may be used to generate a suitable client.
func (*Client) AlbumGetInfo ¶
func (c *Client) AlbumGetInfo(album, artist string, opts ...RequestOption) (FullAlbum, error)
Get the metadata and tracklist for an album on Last.fm using the album name or a musicbrainz id.
artist (Required (unless mbid)] : The artist name
album (Required (unless mbid)] : The album name
mbid (Optional) : The musicbrainz id for the album
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
username (Optional) : The username for the context of the request. If supplied, the user's playcount for this album is included in the response.
lang (Optional) : The language to return the biography in, expressed as an ISO 639 alpha-2 code.
api_key (Required) : A Last.fm API key.
func (*Client) AlbumGetTopTags ¶
func (c *Client) AlbumGetTopTags(album, artist string, opts ...RequestOption) (AlbumTopTags, error)
Get the top tags for an album on Last.fm, ordered by popularity.
artist (Required (unless mbid)] : The artist name
album (Required (unless mbid)] : The album name
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
mbid (Optional) : The musicbrainz id for the album
api_key (Required) : A Last.fm API key.
func (*Client) AlbumSearch ¶
func (c *Client) AlbumSearch(album string, opts ...RequestOption) (AlbumSearchRes, error)
Search for an album by name. Returns album matches sorted by relevance.
limit (Optional) : The number of results to fetch per page. Defaults to 30.
page (Optional) : The page number to fetch. Defaults to first page.
album (Required) : The album name
api_key (Required) : A Last.fm API key.
func (*Client) ArtistGetInfo ¶
func (c *Client) ArtistGetInfo(artist string, opts ...RequestOption) (FullArtist, error)
Get the metadata for an artist. Includes biography, truncated at 300 characters.
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the artist
lang (Optional) : The language to return the biography in, expressed as an ISO 639 alpha-2 code.
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
username (Optional) : The username for the context of the request. If supplied, the user's playcount for this artist is included in the response.
api_key (Required) : A Last.fm API key.
func (*Client) ArtistGetSimilar ¶
func (c *Client) ArtistGetSimilar(artist string, opts ...RequestOption) (SimilarArtists, error)
Get all the artists similar to this artist
limit (Optional) : Limit the number of similar artists returned
artist (Required (unless mbid)] : The artist name
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
mbid (Optional) : The musicbrainz id for the artist
api_key (Required) : A Last.fm API key.
func (*Client) ArtistGetTopAlbums ¶
func (c *Client) ArtistGetTopAlbums(artist string, opts ...RequestOption) (ArtistAlbums, error)
Get the top albums for an artist on Last.fm, ordered by popularity.
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the artist
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
page (Optional) : The page number to fetch. Defaults to first page.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
api_key (Required) : A Last.fm API key.
func (*Client) ArtistGetTopTags ¶
func (c *Client) ArtistGetTopTags(artist string, opts ...RequestOption) (TagsWithCount, error)
Get the top tags for an artist on Last.fm, ordered by popularity.
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the artist
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
api_key (Required) : A Last.fm API key.
func (*Client) ArtistGetTopTracks ¶
func (c *Client) ArtistGetTopTracks(artist string, opts ...RequestOption) (Tracks, error)
Get the top tracks by an artist on Last.fm, ordered by popularity
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the artist
autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
page (Optional) : The page number to fetch. Defaults to first page.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
api_key (Required) : A Last.fm API key.
func (*Client) ArtistSearch ¶
func (c *Client) ArtistSearch(artist string, opts ...RequestOption) (ArtistSearchRes, error)
Search for an artist by name. Returns artist matches sorted by relevance.
limit (Optional) : The number of results to fetch per page. Defaults to 30.
page (Optional) : The page number to fetch. Defaults to first page.
artist (Required) : The artist name
api_key (Required) : A Last.fm API key.
func (*Client) ChartGetTopArtists ¶
func (c *Client) ChartGetTopArtists(opts ...RequestOption) (TopArtists, error)
Get the top artists chart
page (Optional) : The page number to fetch. Defaults to first page.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
api_key (Required) : A Last.fm API key.
func (*Client) ChartGetTopTags ¶
func (c *Client) ChartGetTopTags(opts ...RequestOption) (TopTags, error)
Get the top tags chart
page (Optional) : The page number to fetch. Defaults to first page.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
api_key (Required) : A Last.fm API key.
func (*Client) ChartGetTopTracks ¶
func (c *Client) ChartGetTopTracks(opts ...RequestOption) (ChartTracks, error)
Get the top tracks chart
page (Optional) : The page number to fetch. Defaults to first page.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
api_key (Required) : A Last.fm API key.
func (*Client) GeoGetTopArtists ¶
func (c *Client) GeoGetTopArtists(country string, opts ...RequestOption) (GeoTopArtists, error)
Get the most popular artists on Last.fm by country
country (Required) : A country name, as defined by the ISO 3166-1 country names standard
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) GeoGetTopTracks ¶
func (c *Client) GeoGetTopTracks(country string, opts ...RequestOption) (GeoTopTracks, error)
Get the most popular tracks on Last.fm last week by country
country (Required) : A country name, as defined by the ISO 3166-1 country names standard
location (Optional) : A metro name, to fetch the charts for (must be within the country specified)
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) LibraryGetArtists ¶
func (c *Client) LibraryGetArtists(user string, opts ...RequestOption) (LibraryArtists, error)
A paginated list of all the artists in a user's library, with play counts and tag counts.
user (Required) : The user whose library you want to fetch.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number you wish to scan to.
api_key (Required) : A Last.fm API key.
func (*Client) TagGetInfo ¶
func (c *Client) TagGetInfo(tag string, opts ...RequestOption) (TagInfo, error)
Get the metadata for a tag
lang (Optional) : The language to return the wiki in, expressed as an ISO 639 alpha-2 code.
tag (Required) : The tag name
api_key (Required) : A Last.fm API key.
func (*Client) TagGetTopAlbums ¶
func (c *Client) TagGetTopAlbums(tag string, opts ...RequestOption) (TagTopAlbums, error)
Get the top albums tagged by this tag, ordered by tag count.
tag (Required) : The tag name
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) TagGetTopArtists ¶
func (c *Client) TagGetTopArtists(tag string, opts ...RequestOption) (TagTopArtists, error)
Get the top artists tagged by this tag, ordered by tag count.
tag (Required) : The tag name
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) TagGetTopTags ¶
func (c *Client) TagGetTopTags() (TagTopTags, error)
Fetches the top global tags on Last.fm, sorted by popularity (number of times used)
api_key (Required) : A Last.fm API key.
func (*Client) TagGetTopTracks ¶
func (c *Client) TagGetTopTracks(tag string, opts ...RequestOption) (TagTopTracks, error)
Get the top tracks tagged by this tag, ordered by tag count.
tag (Required) : The tag name
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) TagGetWeeklyChartlist ¶
func (c *Client) TagGetWeeklyChartlist(tag string) (TagWeeklyChartlist, error)
Get a list of available charts for this tag, expressed as date ranges which can be sent to the chart services.
tag (Required) : The tag name
api_key (Required) : A Last.fm API key.
func (*Client) TrackGetCorrection ¶
func (c *Client) TrackGetCorrection(track, artist string) (TrackCorrection, error)
Use the last.fm corrections data to check whether the supplied track has a correction to a canonical track
artist (Required) : The artist name to correct.
track (Required) : The track name to correct.
api_key (Required) : A Last.fm API key.
func (*Client) TrackGetInfo ¶
func (c *Client) TrackGetInfo(track, artist string, opts ...RequestOption) (TrackInfo, error)
Get the metadata for a track on Last.fm using the artist/track name or a musicbrainz id.
mbid (Optional) : The musicbrainz id for the track
track (Required (unless mbid)] : The track name
artist (Required (unless mbid)] : The artist name
username (Optional) : The username for the context of the request. If supplied, the user's playcount for this track and whether they have loved the track is included in the response.
autocorrect[0|1] (Optional) : Transform misspelled artist and track names into correct artist and track names, returning the correct version instead. The corrected artist and track name will be returned in the response.
api_key (Required) : A Last.fm API key.
func (*Client) TrackGetSimilar ¶
func (c *Client) TrackGetSimilar(track, artist string, opts ...RequestOption) (SimilarTracks, error)
Get the similar tracks for this track on Last.fm, based on listening data.
track (Required (unless mbid)] : The track name
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the track
autocorrect[0|1] (Optional) : Transform misspelled artist and track names into correct artist and track names, returning the correct version instead. The corrected artist and track name will be returned in the response.
limit (Optional) : Maximum number of similar tracks to return
api_key (Required) : A Last.fm API key.
func (*Client) TrackGetTags ¶
func (c *Client) TrackGetTags(artist, track, user string, opts ...RequestOption) (TrackTags, error)
Get the tags applied by an individual user to a track on Last.fm. To retrieve the list of top tags applied to a track by all users use track.getTopTags.
artist (Required (unless mbid)] : The artist name
track (Required (unless mbid)] : The track name
mbid (Optional) : The musicbrainz id for the track
autocorrect[0|1] (Optional) : Transform misspelled artist and track names into correct artist and track names, returning the correct version instead. The corrected artist and track name will be returned in the response.
user (Optional) : If called in non-authenticated mode you must specify the user to look up
api_key (Required) : A Last.fm API key.
func (*Client) TrackGetTopTags ¶
func (c *Client) TrackGetTopTags(artist, track, user string, opts ...RequestOption) (TrackTopTags, error)
Get the top tags for this track on Last.fm, ordered by tag count. Supply either track & artist name or mbid.
track (Required (unless mbid)] : The track name
artist (Required (unless mbid)] : The artist name
mbid (Optional) : The musicbrainz id for the track
autocorrect[0|1] (Optional) : Transform misspelled artist and track names into correct artist and track names, returning the correct version instead. The corrected artist and track name will be returned in the response.
api_key (Required) : A Last.fm API key.
func (*Client) TrackSearch ¶
func (c *Client) TrackSearch(track string, opts ...RequestOption) (TrackSearchRes, error)
Search for a track by track name. Returns track matches sorted by relevance.
limit (Optional) : The number of results to fetch per page. Defaults to 30.
page (Optional) : The page number to fetch. Defaults to first page.
track (Required) : The track name
artist (Optional) : Narrow your search by specifying an artist.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetFriends ¶
func (c *Client) UserGetFriends(user string, opts ...RequestOption) (UserFriends, error)
Get a list of the user's friends on Last.fm.
user (Required) : The last.fm username to fetch the friends of.
recenttracks (Optional) : Whether or not to include information about friends' recent listening in the response.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetInfo ¶
Get information about a user profile.
user (Optional) : The user to fetch info for. Defaults to the authenticated user.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetLovedTracks ¶
func (c *Client) UserGetLovedTracks(user string, opts ...RequestOption) (UserLovedTracks, error)
Get the last 50 tracks loved by a user.
user (Required) : The user name to fetch the loved tracks for.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetPersonalAlbumTags ¶
func (c *Client) UserGetPersonalAlbumTags(user, tag string, opts ...RequestOption) (AlbumPersonalTags, error)
Get the user's personal album tags
user (Required) : The user who performed the taggings.
tag (Required) : The tag you're interested in.
taggingtype=album : The type of items which have been tagged
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetPersonalArtistTags ¶
func (c *Client) UserGetPersonalArtistTags(user, tag string, opts ...RequestOption) (ArtistPersonalTags, error)
Get the user's personal artist tags
user (Required) : The user who performed the taggings.
tag (Required) : The tag you're interested in.
taggingtype=artist : The type of items which have been tagged
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetPersonalTrackTags ¶
func (c *Client) UserGetPersonalTrackTags(user, tag string, opts ...RequestOption) (TrackPersonalTags, error)
Get the user's personal track tags
user (Required) : The user who performed the taggings.
tag (Required) : The tag you're interested in.
taggingtype=track : The type of items which have been tagged
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetRecentTracks ¶
func (c *Client) UserGetRecentTracks(user string, opts ...RequestOption) (UserRecentTracks, error)
Get a list of the recent tracks listened to by this user. Also includes the currently playing track with the nowplaying="true" attribute if the user is currently listening.
limit (Optional) : The number of results to fetch per page. Defaults to 50. Maximum is 200.
user (Required) : The last.fm username to fetch the recent tracks of.
page (Optional) : The page number to fetch. Defaults to first page.
from (Optional) : Beginning timestamp of a range - only display scrobbles after this time, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.)
extended (0|1) (Optional) : Includes extended data in each artist, and whether or not the user has loved each track
to (Optional) : End timestamp of a range - only display scrobbles before this time, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.)
api_key (Required) : A Last.fm API key.
func (*Client) UserGetTopAlbums ¶
func (c *Client) UserGetTopAlbums(user string, opts ...RequestOption) (UserTopAlbums, error)
Get the top albums listened to by a user. You can stipulate a time period. Sends the overall chart by default.
user (Required) : The user name to fetch top albums for.
period (Optional) : overall | 7day | 1month | 3month | 6month | 12month - The time period over which to retrieve top albums for.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetTopArtists ¶
func (c *Client) UserGetTopArtists(user string, opts ...RequestOption) (UserTopArtists, error)
Get the top artists listened to by a user. You can stipulate a time period. Sends the overall chart by default.
user (Required) : The user name to fetch top artists for.
period (Optional) : overall | 7day | 1month | 3month | 6month | 12month - The time period over which to retrieve top artists for.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetTopTags ¶
func (c *Client) UserGetTopTags(user string, opts ...RequestOption) (UserTopTags, error)
Get the top tags used by this user.
Params:
user (Required) : The user name
limit (Optional) : Limit the number of tags returned
api_key (Required) : A Last.fm API key.
func (*Client) UserGetTopTracks ¶
func (c *Client) UserGetTopTracks(user string, opts ...RequestOption) (UserTopTracks, error)
Get the top tracks listened to by a user. You can stipulate a time period. Sends the overall chart by default.
Params:
user (Required) : The user name to fetch top tracks for.
period (Optional) : overall | 7day | 1month | 3month | 6month | 12month - The time period over which to retrieve top tracks for.
limit (Optional) : The number of results to fetch per page. Defaults to 50.
page (Optional) : The page number to fetch. Defaults to first page.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetWeeklyAlbumChart ¶
func (c *Client) UserGetWeeklyAlbumChart(user string, opts ...RequestOption) (UserWeeklyAlbumChart, error)
Get an album chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent album chart for this user.
Params:
user (Required) : The last.fm username to fetch the charts of.
from (Optional) : The date at which the chart should start from. See User.getChartsList for more.
to (Optional) : The date at which the chart should end on. See User.getChartsList for more.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetWeeklyArtistChart ¶
func (c *Client) UserGetWeeklyArtistChart(user string, opts ...RequestOption) (UserWeeklyArtistChart, error)
Get an artist chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent artist chart for this user.
Params:
user (Required) : The last.fm username to fetch the charts of.
from (Optional) : The date at which the chart should start from. See User.getChartsList for more.
to (Optional) : The date at which the chart should end on. See User.getChartsList for more.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetWeeklyChartList ¶
func (c *Client) UserGetWeeklyChartList(user string) (UserWeeklyChartList, error)
Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.
Params:
user (Required) : The last.fm username to fetch the charts list for.
api_key (Required) : A Last.fm API key.
func (*Client) UserGetWeeklyTrackChart ¶
func (c *Client) UserGetWeeklyTrackChart(user string, opts ...RequestOption) (UserWeeklyTrackChart, error)
Get a track chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent track chart for this user.
Params:
user (Required) : The last.fm username to fetch the charts of.
from (Optional) : The date at which the chart should start from. See User.getChartsList for more.
to (Optional) : The date at which the chart should end on. See User.getChartsList for more.
api_key (Required) : A Last.fm API key.
type CorrectedAttr ¶
type CorrectedAttr struct {
Index string `json:"index"`
ArtistCorrected string `json:"artistcorrected"`
TrackCorrected string `json:"trackcorrected"`
}
CorrectedAttr ...
type CorrectedTrack ¶
type CorrectedTrack struct {
Name string `json:"name"`
URL string `json:"url"`
MBID string `json:"mbid"`
Artist AlbumArtist `json:"artist"`
}
CorrectedTrack ...
type Error ¶
type Error struct {
// A short description of the error.
Message string `json:"message"`
// The HTTP status code.
Err int `json:"error"`
}
Error represents an error returned by the Last.fm Web API.
type FullAlbum ¶
type FullAlbum struct {
Artist string `json:"artist"`
MBID string `json:"mbid"`
Tags Tags `json:"tags"`
Playcount string `json:"playcount"`
Image []Image `json:"image"`
Tracks AlbumTracks `json:"tracks"`
URL string `json:"url"`
Name string `json:"name"`
Listeners string `json:"listeners"`
Wiki Wiki `json:"wiki"`
}
FullAlbum ...
type FullArtist ¶
type FullArtist struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
Image []Image `json:"image"`
Streamable string `json:"streamable"`
OnTour string `json:"on_tour"`
Stats ArtistStats `json:"stats"`
Similar Artists `json:"similar"`
Tags Tags `json:"tags"`
Bio Bio `json:"bio"`
}
FullArtist ...
type GeoAttr ¶
type GeoAttr struct {
Country string `json:"country"`
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
GeoAttr ...
type GeoTopArtists ¶
GeoTopArtists ...
type GeoTopTracks ¶
GeoTopTracks ...
type GeoTrack ¶
type GeoTrack struct {
Name string `json:"name"`
Duration string `json:"duration"`
Listeners string `json:"listeners"`
MBID string `json:"mbid"`
URL string `json:"url"`
Streamable StreamableTrack `json:"streamable"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr TrackRank `json:"@attr"`
}
GeoTrack ...
type LibraryArtist ¶
type LibraryArtist struct {
TagCount string `json:"tagcount"`
Image []Image `json:"image"`
MBID string `json:"mbid"`
URL string `json:"url"`
Playcount string `json:"playcount"`
Name string `json:"name"`
Streamable string `json:"streamable"`
}
LibraryArtist ...
type LibraryArtists ¶
type LibraryArtists struct {
Artists []LibraryArtist `json:"artist"`
Attr UserAttr `json:"@attr"`
}
LibraryArtists ...
type LovedTrack ¶
type LovedTrack struct {
Artist AlbumArtist `json:"artist"`
Date TrackDate `json:"date"`
MBID string `json:"mbid"`
URL string `json:"url"`
Name string `json:"name"`
Image []Image `json:"image"`
Streamable StreamableTrack `json:"streamable"`
}
LovedTrack ...
type OpenSearchQuery ¶
type OpenSearchQuery struct {
Text string `json:"#text"`
Role string `json:"role"`
SearchTerms string `json:"searchTerms"`
StartPage string `json:"startPage"`
}
OpenSearchQuery ...
type PathOptions ¶
type PathOptions struct {
// contains filtered or unexported fields
}
PathOptions is the opt for URL parameters
type PersonalTagAttr ¶
type PersonalTagAttr struct {
User string `json:"user"`
Tag string `json:"tag"`
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
PersonalTagAttr ...
type PersonalTrack ¶
type PersonalTrack struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
Duration string `json:"duration"`
Streamable StreamableTrack `json:"streamable"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
}
PersonalTrack ...
type RecentDate ¶
RecentDate ...
type RequestOption ¶
type RequestOption func(*requestOptions)
RequestOption ...
func AutocorrectOpt ¶
func AutocorrectOpt(autocorrect Binary) RequestOption
AutocorrectOpt – Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
func CountryOpt ¶
func CountryOpt(code string) RequestOption
CountryOpt – A country name, as defined by the ISO 3166-1 country names standard
func ExtendedOpt ¶
func ExtendedOpt(extend Binary) RequestOption
ExtendedOpt – Includes extended data in each artist, and whether or not the user has loved each track
func FromOpt ¶
func FromOpt(from int) RequestOption
FromOpt – The date at which the chart should start from. See User.getChartsList for more. integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.
func LangOpt ¶
func LangOpt(lang string) RequestOption
Lang – The language to return the biography in, expressed as an ISO 639 alpha-2 code.
func LimitOpt ¶
func LimitOpt(amount int) RequestOption
LimitOpt – The number of results to fetch per page. Defaults to 50. Maximum is 200.
func LocationOpt ¶
func LocationOpt(local string) RequestOption
LocationOpt – A metro name, to fetch the charts for (must be within the country specified)
func PageOpt ¶
func PageOpt(page int) RequestOption
PageOpt – The page number to fetch. Defaults to first page.
func PeriodOpt ¶
func PeriodOpt(period TimePeriod) RequestOption
PeriodOpt – The time period over which to retrieve data for.
func TaggingTypeOpt ¶
func TaggingTypeOpt(tag Tagging) RequestOption
TaggingTypeOpt – The type of items which have been tagged
func ToOpt ¶
func ToOpt(to int) RequestOption
ToOpt – End timestamp of a range - only display scrobbles before this time, in UNIX timestamp format integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.
func UsernameOpt ¶
func UsernameOpt(user string) RequestOption
Username – The username for the context of the request. If supplied, the user's playcount for this album is included in the response.
type SimilarArtists ¶
type SimilarArtists struct {
SimilarArtists []Artist `json:"artist"`
Attr ArtistTagAttr `json:"@attr"`
}
SimilarArtists ...
type SimilarTrack ¶
type SimilarTrack struct {
Name string `json:"name"`
Playcount int `json:"playcount"`
MBID string `json:"mbid"`
Match float32 `json:"match"`
URL string `json:"url"`
Streamable StreamableTrack `json:"streamable"`
Duration int `json:"duration"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
}
SimilarTrack ...
type SimilarTracks ¶
type SimilarTracks struct {
Tracks []SimilarTrack `json:"track"`
Attr SimpleArtistAttr `json:"@attr"`
}
SimilarTracks ...
type SimpleAlbum ¶
type SimpleAlbum struct {
Name string `json:"name"`
Artist string `json:"artist"`
URL string `json:"url"`
Image []Image `json:"image"`
Streamable string `json:"streamable"`
MBID string `json:"mbid"`
}
SimpleAlbum ...
type SimpleArtistAttr ¶
type SimpleArtistAttr struct {
Artist string `json:"artist"`
}
SimpleArtistAttr ...
type StreamableTrack ¶
StreamableTrack ...
type TagAlbum ¶
type TagAlbum struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr Rank `json:"@attr"`
}
TagAlbum ...
type TagArtist ¶
type TagArtist struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
Streamable string `json:"streamable"`
Image []Image `json:"image"`
Attr Rank `json:"@attr"`
}
TagArtist ...
type TagAttr ¶
type TagAttr struct {
Tag string `json:"tag"`
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
TagAttr ...
type TagChartlist ¶
type TagChartlist struct {
Text string `json:"#text"`
From string `json:"from"`
To string `json:"to"`
}
TagChartlist ...
type TagInfo ¶
type TagInfo struct {
Name string `json:"name"`
Total int `json:"total"`
Reach int `json:"reach"`
Wiki Wiki `json:"wiki"`
}
TagInfo ...
type TagTopAlbums ¶
TagTopAlbums ...
type TagTopArtists ¶
TagTopArtists ...
type TagTopTags ¶
type TagTopTags struct {
Attr TopTagAttr `json:"@attr"`
Tag []TopTag `json:"tag"`
}
TagTopTags ...
type TagTopTracks ¶
TagTopTracks ...
type TagTrack ¶
type TagTrack struct {
Name string `json:"name"`
Duration string `json:"duration"`
MBID string `json:"mbid"`
URL string `json:"url"`
Streamable StreamableTrack `json:"streamable"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr Rank `json:"@attr"`
}
TagTrack ...
type TagWeeklyChartlist ¶
type TagWeeklyChartlist struct {
Charts []TagChartlist `json:"chart"`
Attr TagChartAttr `json:"@attr"`
}
TagWeeklyChartlist ...
type TagWithCount ¶
type TagWithCount struct {
Count int `json:"count"`
Name string `json:"name"`
URL string `json:"url"`
}
TagWithCount identifies a tag with count
type TagWithStrCount ¶
type TagWithStrCount struct {
Name string `json:"name"`
URL string `json:"url"`
Count string `json:"count"`
}
TagWithStrCount ...
type TagsWithCount ¶
type TagsWithCount struct {
Tag []TagWithCount `json:"tag"`
Attr ArtistTagAttr `json:"@attr"`
}
TagsWithCount ...
type TimePeriod ¶
type TimePeriod string
TimePeriod ...
const ( // Overall ... Overall TimePeriod = "overall" // Week ... Week TimePeriod = "7day" // OneMonth ... OneMonth TimePeriod = "1month" // ThreeMonth ... ThreeMonth TimePeriod = "3month" // SixMonth ... SixMonth TimePeriod = "6month" // Year ... Year TimePeriod = "12month" )
type TopArtists ¶
type TopArtists struct {
Artist []ChartArtist `json:"artist"`
Attr ChartAttr `json:"@attr"`
}
TopArtists ...
type TopTagAttr ¶
type TopTagAttr struct {
Offset int `json:"offset"`
NumRes int `json:"num_res"`
Total int `json:"total"`
}
TopTagAttr ...
type Track ¶
type Track struct {
Name string `json:"name"`
Playcount string `json:"playcount"`
Listeners string `json:"listeners"`
MBID string `json:"mbid"`
URL string `json:"url"`
Streamable string `json:"streamable"`
Artist AlbumArtist `json:"artist"`
Image []Image `json:"image"`
Attr TrackRank `json:"@attr"`
}
Track ...
type TrackAlbum ¶
type TrackAlbum struct {
Streamable StreamableTrack `json:"streamable"`
Duration int `json:"duration"`
URL string `json:"url"`
Name string `json:"name"`
Attr TrackRankInt `json:"@attr"`
Artist AlbumArtist `json:"artist"`
}
TrackAlbum ...
type TrackCorrection ¶
type TrackCorrection struct {
Track CorrectedTrack `json:"track"`
Attr CorrectedAttr `json:"@attr"`
}
TrackCorrection ...
type TrackInfo ¶
type TrackInfo struct {
Name string `json:"name"`
MBID string `json:"mbid"`
URL string `json:"url"`
Duration string `json:"duration"`
Streamable StreamableTrack `json:"streamable"`
Listeners string `json:"listeners"`
Playcount string `json:"playcount"`
Artist AlbumArtist `json:"artist"`
Album TrackInfoAlbum `json:"album"`
TopTags Tags `json:"toptags"`
Wiki Wiki `json:"wiki"`
}
TrackInfo ...
type TrackInfoAlbum ¶
type TrackInfoAlbum struct {
Artist string `json:"artist"`
Title string `json:"title"`
MBID string `json:"mbid"`
URL string `json:"url"`
Image []Image `json:"image"`
Attr PosAttr `json:"@attr"`
}
TrackInfoAlbum ...
type TrackMatch ¶
type TrackMatch struct {
Name string `json:"name"`
Artist string `json:"artist"`
URL string `json:"url"`
Streamable string `json:"streamable"`
Listeners string `json:"listeners"`
Image []Image `json:"image"`
MBID string `json:"mbid"`
}
TrackMatch ...
type TrackMatches ¶
type TrackMatches struct {
Tracks []TrackMatch `json:"track"`
}
TrackMatches ...
type TrackPersonalTag ¶
type TrackPersonalTag struct {
Tracks []PersonalTrack `json:"track"`
}
TrackPersonalTag ...
type TrackPersonalTags ¶
type TrackPersonalTags struct {
TrackTags TrackPersonalTag `json:"tracks"`
Attr PersonalTagAttr `json:"@attr"`
}
TrackPersonalTags ...
type TrackRanked ¶
type TrackRanked struct {
Streamable StreamableTrack `json:"streamable"`
MBID string `json:"mbid"`
Name string `json:"name"`
Image []Image `json:"image"`
Artist AlbumArtist `json:"artist"`
URL string `json:"url"`
Duration string `json:"duration"`
Attr TrackRank `json:"@attr"`
Playcount string `json:"playcount"`
}
TrackRanked ...
type TrackRecent ¶
type TrackRecent struct {
Artist ArtistRecent `json:"artist"`
Date RecentDate `json:"date"`
MBID string `json:"mbid"`
Name string `json:"name"`
Image []Image `json:"image"`
URL string `json:"url"`
Streamable string `json:"streamable"`
Album AlbumRecent `json:"album"`
Loved string `json:"loved,omitempty"`
}
TrackRecent ...
type TrackSearchRes ¶
type TrackSearchRes struct {
Query OpenSearchQuery `json:"opensearch:Query"`
QueryTotalResults string `json:"opensearch:totalResults"`
QueryStartIndex string `json:"opensearch:startIndex"`
QueryItemsPerPage string `json:"opensearch:itemsPerPage"`
TrackMatches TrackMatches `json:"trackmatches"`
Attr SearchAttr `json:"@attr"`
}
TrackSearchRes ...
type TrackTags ¶
type TrackTags struct {
Tags []Tag `json:"tag,omitempty"`
Text string `json:"#text,omitempty"`
Attr ArtistTrackAttr `json:"@attr"`
}
TrackTags ...
type TrackTopTags ¶
type TrackTopTags struct {
Tags []TagWithCount `json:"tag"`
Attr ArtistTrackAttr `json:"@attr"`
}
TrackTopTags ...
type Tracks ¶
type Tracks struct {
Track []Track `json:"track"`
Attr ArtistAttr `json:"@attr"`
}
Tracks ...
type User ¶
type User struct {
Country string `json:"country"`
Age string `json:"age"`
Playcount string `json:"playcount"`
Subscriber string `json:"subscriber"`
Realname string `json:"realname"`
Playlists string `json:"playlists"`
Bootstrap string `json:"bootstrap"`
Image []Image `json:"image"`
Registered UserRegistered `json:"registered"`
URL string `json:"url"`
Gender string `json:"gender"`
Name string `json:"name"`
Type string `json:"type"`
}
User ...
type UserAttr ¶
type UserAttr struct {
User string `json:"user"`
Page string `json:"page"`
PerPage string `json:"perPage"`
TotalPages string `json:"totalPages"`
Total string `json:"total"`
}
UserAttr ...
type UserFriend ¶
type UserFriend struct {
Country string `json:"country"`
Age string `json:"age"`
Playcount string `json:"playcount"`
Subscriber string `json:"subscriber"`
Realname string `json:"realname"`
Playlists string `json:"playlists"`
Bootstrap string `json:"bootstrap"`
Image []Image `json:"image"`
Registered UserRegisteredStr `json:"registered"`
URL string `json:"url"`
Gender string `json:"gender"`
Name string `json:"name"`
Type string `json:"type"`
}
UserFriend ...
type UserFriends ¶
type UserFriends struct {
Attr UserAttr `json:"@attr"`
Users []UserFriend `json:"user"`
}
UserFriends ...
type UserLovedTracks ¶
type UserLovedTracks struct {
Tracks []LovedTrack `json:"track"`
Attr UserAttr `json:"@attr"`
}
UserLovedTracks ...
type UserRecentTracks ¶
type UserRecentTracks struct {
Tracks []TrackRecent `json:"track"`
Attr UserAttr `json:"@attr"`
}
UserRecentTracks ...
type UserRegistered ¶
UserRegistered ...
type UserRegisteredStr ¶
type UserRegisteredStr struct {
Unixtime string `json:"unixtime"`
}
UserRegisteredStr ...
type UserTopAlbums ¶
type UserTopAlbums struct {
Albums []AlbumRanked `json:"album"`
Attr UserAttr `json:"@attr"`
}
UserTopAlbums ...
type UserTopArtists ¶
type UserTopArtists struct {
Artists []ArtistRanked `json:"artist"`
Attr UserAttr `json:"@attr"`
}
UserTopArtists ...
type UserTopTags ¶
type UserTopTags struct {
Tags []TagWithStrCount `json:"tag"`
Attr UserAttrSimple `json:"@attr"`
}
UserTopTags ...
type UserTopTracks ¶
type UserTopTracks struct {
Tracks []TrackRanked `json:"track"`
Attr UserAttr `json:"@attr"`
}
UserTopTracks ...
type UserWeeklyAlbumChart ¶
type UserWeeklyAlbumChart struct {
Albums []WeeklyAlbumChart `json:"album"`
Attr WeeklyAttr `json:"@attr"`
}
UserWeeklyAlbumChart ...
type UserWeeklyArtistChart ¶
type UserWeeklyArtistChart struct {
Artists []WeeklyArtistChart `json:"artist"`
Attr WeeklyAttr `json:"@attr"`
}
UserWeeklyArtistChart ...
type UserWeeklyChartList ¶
type UserWeeklyChartList struct {
Charts []ChartDates `json:"chart"`
Attr UserAttrSimple `json:"@attr"`
}
UserWeeklyChartList ...
type UserWeeklyTrackChart ¶
type UserWeeklyTrackChart struct {
Tracks []WeeklyTrackChart `json:"track"`
Attr WeeklyAttr `json:"@attr"`
}
UserWeeklyTrackChart ...
type WeeklyAlbumChart ¶
type WeeklyAlbumChart struct {
Artist AlbumRecent `json:"artist"`
MBID string `json:"mbid"`
URL string `json:"url"`
Name string `json:"name"`
Attr Rank `json:"@attr"`
Playcount string `json:"playcount"`
}
WeeklyAlbumChart ...
type WeeklyArtistChart ¶
type WeeklyArtistChart struct {
MBID string `json:"mbid"`
URL string `json:"url"`
Name string `json:"name"`
Attr Rank `json:"@attr"`
Playcount string `json:"playcount"`
}
WeeklyArtistChart ...
type WeeklyAttr ¶
type WeeklyAttr struct {
From string `json:"from"`
User string `json:"user"`
To string `json:"to"`
}
WeeklyAttr ...
type WeeklyTrackChart ¶
type WeeklyTrackChart struct {
Artist AlbumRecent `json:"artist"`
Image []Image `json:"image"`
MBID string `json:"mbid"`
URL string `json:"url"`
Name string `json:"name"`
Attr TrackRank `json:"@attr"`
Playcount string `json:"playcount"`
}
WeeklyTrackChart ...