lastfm

package
v0.0.0-...-89a801c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: MIT Imports: 11 Imported by: 59

Documentation

Index

Constants

View Source
const (
	ApiResponseStatusOk     = "ok"
	ApiResponseStatusFailed = "failed"
)
View Source
const (
	ErrorAuthRequired          = 50
	ErrorParameterMissing      = 51
	ErrorInvalidTypeOfArgument = 52
)
View Source
const (
	UriApiSecBase  = "https://ws.audioscrobbler.com/2.0/"
	UriApiBase     = "http://ws.audioscrobbler.com/2.0/"
	UriBrowserBase = "https://www.last.fm/api/auth/"
)

Variables

View Source
var Messages = map[int]string{
	50: "This method requires authentication.",
	51: "Required parameter missing. Required: %v, Missing: %v.",
	52: "Invalid type of argument passed. Supported types are int, string and []string.",
}

Functions

This section is empty.

Types

type AlbumGetInfo

type AlbumGetInfo struct {
	XMLName     xml.Name `xml:"album"`
	Name        string   `xml:"name"`
	Artist      string   `xml:"artist"`
	Id          string   `xml:"id"`
	Mbid        string   `xml:"mbid"`
	Url         string   `xml:"url"`
	ReleaseDate string   `xml:"releasedate"`
	Images      []struct {
		Size string `xml:"size,attr"`
		Url  string `xml:",chardata"`
	} `xml:"image"`
	Listeners string `xml:"listeners"`
	PlayCount string `xml:"plyacount"`
	Tracks    []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		Duration   string `xml:"duration"`
		Mbid       string `xml:"Mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:"streamable"`
		} `xml:"streamable"`
		Artist struct {
			Name string `xml:"name"`
			Mbid string `xml:"mbid"`
			Url  string `xml:"url"`
		} `xml:"artist"`
	} `xml:"tracks>track"`
	TopTags []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"`
}

album.getInfo

type AlbumGetTags

type AlbumGetTags struct {
	XMLName xml.Name `xml:"tags"`
	Artist  string   `xml:"artist,attr"`
	Album   string   `xml:"album,attr"`
	Tags    []struct {
		Name string `xml:"name"`
		Url  string `xml:"url"`
	} `xml:"tag"`
}

album.getTags

type AlbumGetTopTags

type AlbumGetTopTags struct {
	XMLName xml.Name `xml:"toptags"`
	Aritist string   `xml:"artist,attr"`
	Album   string   `xml:"album,attr"`
	Tags    []struct {
		Name  string `xml:"name"`
		Count string `xml:"count"`
		Url   string `xml:"url"`
	} `xml:"tag"`
}

album.getTopTags

type AlbumSearch

type AlbumSearch struct {
	XMLName    xml.Name `xml:"results"`
	OpenSearch string   `xml:"opensearch,attr"`
	For        string   `xml:"for,attr"`
	Query      struct {
		Role        string `xml:"role,attr"`
		SearchTerms string `xml:"searchTrems,attr"`
		StartPage   int    `xml:"startPage,attr"`
	} `xml:"Query"`
	TotalResults int `xml:"totalResults"`
	StartIndex   int `xml:"startIndex"`
	ItemsPerPage int `xml:"itemsPerPage"`
	AlbumMatches []struct {
		Name   string `xml:"name"`
		Artist string `xml:"artist"`
		Id     string `xml:"id"`
		Url    string `xml:"url"`
		Images []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
		Streamable string `xml:"streamable"`
		Mbid       string `xml:"mbid"`
	} `xml:"albummatches>album"`
}

album.search

type Api

type Api struct {
	Album   *albumApi
	Artist  *artistApi
	Chart   *chartApi
	Geo     *geoApi
	Library *libraryApi
	Tag     *tagApi
	Track   *trackApi
	User    *userApi
	// contains filtered or unexported fields
}

func New

func New(key, secret string) (api *Api)

func (Api) GetAuthRequestUrl

func (api Api) GetAuthRequestUrl(callback string) (uri string)

Web app style

func (Api) GetAuthTokenUrl

func (api Api) GetAuthTokenUrl(token string) (uri string)

func (Api) GetSessionKey

func (api Api) GetSessionKey() (sk string)

func (Api) GetToken

func (api Api) GetToken() (token string, err error)

Desktop app style

func (*Api) Login

func (api *Api) Login(username, password string) (err error)

Mobile app style

func (*Api) LoginWithToken

func (api *Api) LoginWithToken(token string) (err error)

Desktop and Web app style

func (*Api) SetSession

func (api *Api) SetSession(sessionkey string)

func (*Api) SetUserAgent

func (api *Api) SetUserAgent(useragent string)

type ApiError

type ApiError struct {
	Code    int    `xml:"code,attr"`
	Message string `xml:",chardata"`
}

type ArtistGetCorrection

type ArtistGetCorrection struct {
	XMLName    xml.Name `xml:"corrections"`
	Correction struct {
		Index  string `xml:"index,attr"`
		Artist struct {
			Name string `xml:"name"`
			Mbid string `xml:"mbid"`
			Url  string `xml:"url"`
		} `xml:"artist"`
	} `xml:"correction"`
}

artist.getCorrection

type ArtistGetInfo

type ArtistGetInfo 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 string `xml:"streamable"`
	Stats      struct {
		Listeners string `xml:"listeners"`
		Plays     string `xml:"plays"`
	} `xml:"stats"`
	//Similar struct {
	//Artists []struct {
	//Name   string `xml:"name"`
	//Url    string `xml:"url"`
	//Images []struct {
	//Size string `xml:"size,attr"`
	//Url  string `xml:",chardata"`
	//} `xml:"image"`
	//} `xml:"artist"`
	//} `xml:"similar"`
	Similars []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 {
		Links []struct {
			Rel string `xml:"rel,attr"`
			Url string `xml:"href,attr"`
		} `xml:"links>link"`
		Published  string `xml:"published"`
		Summary    string `xml:"summary"`
		Content    string `xml:"content"`
		YearFormed string `xml:"yearformed"`
	} `xml:"bio"`
}

artist.getInfo

type ArtistGetSimilar

type ArtistGetSimilar struct {
	XMLName  xml.Name `xml:"similarartists"`
	Artist   string   `xml:"artist,attr"`
	Similars []struct {
		Name   string `xml:"name"`
		Mbid   string `xml:"mbid"`
		Match  string `xml:"match"`
		Url    string `xml:"url"`
		Images []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
		Streamable string `xml:"streamable"`
	} `xml:"artist"`
}

artist.getSimilar

type ArtistGetTags

type ArtistGetTags struct {
	XMLName xml.Name `xml:"tags"`
	Artist  string   `xml:"artist,attr"`
	Tags    []struct {
		Name string `xml:"name"`
		Url  string `xml:"url"`
	} `xml:"tag"`
}

artist.getTags

type ArtistGetTopAlbums

type ArtistGetTopAlbums struct {
	XMLName    xml.Name `xml:"topalbums"`
	Artist     string   `xml:"artist,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Albums     []struct {
		Rank   string `xml:"rank,attr"`
		Name   string `xml:"name"`
		Mbid   string `xml:"mbid"`
		Artist struct {
			Name string `xml:"name"`
			Mbid string `xml:"mbid"`
			Url  string `xml:"url"`
		} `xml:"artist"`
		PlayCount string `xml:"playcount"`
		Url       string `xml:"url"`
		Images    []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"album"`
}

artist.getTopAlbums

type ArtistGetTopTags

type ArtistGetTopTags struct {
	XMLName xml.Name `xml:"toptags"`
	Artist  string   `xml:"artist,attr"`
	Tags    []struct {
		Name  string `xml:"name"`
		Count string `xml:"count"`
		Url   string `xml:"url"`
	} `xml:"tag"`
}

artist.getTopTags

type ArtistGetTopTracks

type ArtistGetTopTracks struct {
	XMLName    xml.Name `xml:"toptracks"`
	Artist     string   `xml:"artist,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Rank      string `xml:"rank,attr"`
		Name      string `xml:"name"`
		Duration  string `xml:"duration"`
		PlayCount string `xml:"playcount"`
	} `xml:"track"`
}

artist.getTopTracks

type ArtistSearch

type ArtistSearch struct {
	XMLName    xml.Name `xml:"results"`
	OpenSearch string   `xml:"opensearch,attr"`
	For        string   `xml:"for,attr"`
	Query      struct {
		Role        string `xml:"role,attr"`
		SearchTerms string `xml:"searchTrems,attr"`
		StartPage   int    `xml:"startPage,attr"`
	} `xml:"Query"`
	TotalResults  int `xml:"totalResults"`
	StartIndex    int `xml:"startIndex"`
	ItemsPerPage  int `xml:"itemsPerPage"`
	ArtistMatches []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"`
		Listeners string `xml:"listeners"`
	} `xml:"artistmatches>artist"`
}

artist.search

type AuthGetMobileSession

type AuthGetMobileSession struct {
	Name       string `xml:"name"` //username
	Key        string `xml:"key"`  //session key
	Subscriber bool   `xml:"subscriber"`
}

auth.getMobileSession

type AuthGetSession

type AuthGetSession AuthGetMobileSession

auth.getSession

type AuthGetToken

type AuthGetToken struct {
	Token string `xml:",chardata"`
}

auth.getToken

type Base

type Base struct {
	XMLName xml.Name `xml:"lfm"`
	Status  string   `xml:"status,attr"`
	Inner   []byte   `xml:",innerxml"`
}

type ChartGetTopArtists

type ChartGetTopArtists struct {
	XMLName    xml.Name `xml:"artists"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Artists    []struct {
		Name       string `xml:"name"`
		PlayCount  string `xml:"playcount"`
		Listeners  string `xml:"listeners"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
		Images     []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"artist"`
}

chart.getTopArtists

type ChartGetTopTags

type ChartGetTopTags struct {
	XMLName    xml.Name `xml:"tags"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tags       []struct {
		Name       string `xml:"name"`
		Url        string `xml:"url"`
		Reach      string `xml:"reach"`
		Taggings   string `xml:"taggings"`
		Streamable string `xml:"streamable"`
		Wiki       struct {
			Published string `xml:"published"`
			Summary   string `xml:"summary"`
			Content   string `xml:"content"`
		} `xml:"wiki"`
	} `xml:"tag"`
}

chart.getTopTags

type ChartGetTopTracks

type ChartGetTopTracks struct {
	XMLName    xml.Name `xml:"tracks"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Name       string `xml:"name"`
		Duration   string `xml:"duration"`
		PlayCount  string `xml:"playcount"`
		Listeners  string `xml:"listeners"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `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"`
}

chart.getTopTracks

type GeoGetTopArtists

type GeoGetTopArtists struct {
	XMLName    xml.Name `xml:"topartists"`
	Country    string   `xml:"country,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Artists    []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `Xml:"name"`
		Listeners  string `xml:"listeners"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
		Images     []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"artist"`
}

geo.getTopArtists

type GeoGetTopTracks

type GeoGetTopTracks struct {
	XMLName    xml.Name `xml:"toptracks"`
	Country    string   `xml:"country,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		Duration   string `xml:"duration"`
		Listeners  string `xml:"listeners"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:",chardata"`
		} `xml:"streamable"`
		Artist struct {
			Name string `xml:"artist"`
			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"`
}

geo.getTopTracks

type LastfmError

type LastfmError struct {
	Code    int
	Message string
	Where   string
	Caller  string
}

func (*LastfmError) Error

func (e *LastfmError) Error() string

type LibraryGetArtists

type LibraryGetArtists struct {
	XMLName    xml.Name `xml:"artists"`
	User       string   `xml:"user,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Artists    []struct {
		Name       string `xml:"name"`
		PlayCount  string `xml:"playcount"`
		TagCount   string `xml:"tagcount"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
		Images     []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"artist"`
}

library.getArtists

type P

type P map[string]interface{}

type TagGetInfo

type TagGetInfo struct {
	XMLName    xml.Name `tag`
	Name       string   `xml:"name"`
	Url        string   `xml:"url"`
	Reach      string   `xml:"reach"`
	Taggings   string   `xml:"taggings"`
	Streamable string   `xml:"streamable"`
	Wiki       struct {
		Published string `xml:"published"`
		Summary   string `xml:"summary"`
		Content   string `xml:"content"`
	} `xml:"wiki"`
}

tag.getinfo

type TagGetSimilar

type TagGetSimilar struct {
	XMLName xml.Name `xml:"similartags"`
	Tag     string   `xml:"tag,attr"`
	Tags    []struct {
		Name       string `xml:"name"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
	} `xml:"tag"`
}

tag.getSimilar

type TagGetTopAlbums

type TagGetTopAlbums struct {
	XMLName    xml.Name `xml:"topalbums"`
	Tag        string   `xml:"tag,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Albums     []struct {
		Rank   string `xml:"rank,attr"`
		Name   string `xml:"name"`
		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"`
}

tag.getTopAlbums

type TagGetTopArtists

type TagGetTopArtists struct {
	XMLName xml.Name `xml:"topartists"`
	Tag     string   `xml:"tag,attr"`
	//Total      string   `xml:"total,attr"`
	//Page       string   `xml:"page,attr"`
	//PerPage    string   `xml:"perPage,attr"`
	//TotalPages string   `xml:"totalPages"`
	Artists []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
		Images     []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"artist"`
}

tag.getTopArtists

type TagGetTopTags

type TagGetTopTags struct {
	XMLName xml.Name `xml:"toptags"`
	Tags    []struct {
		Name  string `xml:"name"`
		Count string `xml:"count"`
		Url   string `xml:"url"`
	} `xml:"tag"`
}

tag.getTopTags

type TagGetTopTracks

type TagGetTopTracks struct {
	XMLName    xml.Name `xml:"toptracks"`
	Tag        string   `xml:"tag,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		Duration   string `xml:"duration"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:"streamable"`
		} `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"`
}

tag.getTopTracks

type TagGetWeeklyChartList

type TagGetWeeklyChartList struct {
	XMLName xml.Name `xml:"weeklychartlist"`
	Tag     string   `xml:"tag,attr"`
	Charts  []struct {
		From string `xml:"from,attr"`
		To   string `xml:"to,attr"`
	} `xml:"chart"`
}

tag.getWeeklyChartList

type TrackGetCorrection

type TrackGetCorrection struct {
	XMLName    xml.Name `xml:"corrections"`
	Correction struct {
		Index           string `xml:"index,attr"`
		ArtistCorrected string `xml:"artistcorrected"`
		TrackCorrected  string `xml:"trackcorrected"`
		Track           struct {
			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"`
		} `xml:"track"`
	} `xml:"correction"`
}

track.getCorrection

type TrackGetInfo

type TrackGetInfo struct {
	XMLName    xml.Name `xml:"track"`
	Id         string   `xml:"id"`
	Name       string   `xml:"name"`
	Mbid       string   `xml:"mbid"`
	Url        string   `xml:"url"`
	Duration   string   `xml:"duration"`
	Streamable struct {
		FullTrack  string `xml:"fulltrack,attr"`
		Streamable string `xml:",chardata"`
	} `xml:"streamable"`
	PlayCount     string `xml:"playcount"`
	UserPlayCount string `xml:"userplaycount"`
	UserLoved     string `xml:"userloved"`
	Artist        struct {
		Name string `xml:"name"`
		Mbid string `xml:"mbid"`
		Url  string `xml:"url"`
	} `xml:"artist"`
	Album struct {
		Position string `xml:"position,attr"`
		Artist   string `xml:"artist"`
		Title    string `xml:"title"`
		Mbid     string `xml:"mbid"`
		Url      string `xml:"url"`
		Images   []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"album"`
	TopTags []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"`
}

track.getInfo

type TrackGetSimilar

type TrackGetSimilar struct {
	XMLName xml.Name `xml:"similartracks"`
	Track   string   `xml:"track,attr"`
	Artist  string   `xml:"artist,attr"`
	Tracks  []struct {
		Name       string `xml:"name"`
		PlayCount  string `xml:"playcount"`
		Mbid       string `xml:"mbid"`
		Match      string `xml:"match"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:",chardata"`
		} `xml:"streamable"`
		Duration string `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"`
	} `xml:"track"`
}

track.getSimilar

type TrackGetTags

type TrackGetTags struct {
	XMLName xml.Name `xml:"tags"`
	Artist  string   `xml:"artist,attr"`
	Track   string   `xml:"track,attr"`
	Tags    []struct {
		Name string `xml:"name"`
		Url  string `xml:"url"`
	} `xml:"tag"`
}

track.getTags

type TrackGetTopTags

type TrackGetTopTags struct {
	XMLName xml.Name `xml:"toptags"`
	Artist  string   `xml:"artist,attr"`
	Track   string   `xml:"track,attr"`
	Tags    []struct {
		Name  string `xml:"name"`
		Count string `xml:"count"`
		Url   string `xml:"url"`
	} `xml:"tag"`
}

track.getTopTags

type TrackScrobble

type TrackScrobble struct {
	XMLName   xml.Name `xml:"scrobbles"`
	Accepted  string   `xml:"accepted,attr"`
	Ignored   string   `xml:"ignored,attr"`
	Scrobbles []struct {
		Track struct {
			Corrected string `xml:"corrected,attr"`
			Name      string `xml:",chardata"`
		} `xml:"track"`
		Artist struct {
			Corrected string `xml:"corrected,attr"`
			Name      string `xml:",chardata"`
		} `xml:"artist"`
		Album struct {
			Corrected string `xml:"corrected,attr"`
			Name      string `xml:",chardata"`
		} `xml:"album"`
		AlbumArtist struct {
			Corrected string `xml:"corrected,attr"`
			Name      string `xml:",chardata"`
		} `xml:"albumArtist"`
		TimeStamp      string `xml:"timestamp"`
		IgnoredMessage struct {
			Corrected string `xml:"corrected,attr"`
			Body      string `xml:",chardata"`
		} `xml:"ignoredMessage"`
	} `xml:"scrobble"`
}

track.scrobble

type TrackSearch

type TrackSearch struct {
	XMLName    xml.Name `xml:"results"`
	OpenSearch string   `xml:"opensearch,attr"`
	For        string   `xml:"for,attr"`
	Query      struct {
		Role        string `xml:"role,attr"`
		SearchTerms string `xml:"searchTrems,attr"`
		StartPage   int    `xml:"startPage,attr"`
	} `xml:"Query"`
	TotalResults int `xml:"totalResults"`
	StartIndex   int `xml:"startIndex"`
	ItemsPerPage int `xml:"itemsPerPage"`
	Tracks       []struct {
		Name       string `xml:"name"`
		Mbid       string `xml:"mbid"`
		Artist     string `xml:"artist"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:"streamable"`
		} `xml:"streamable"`
		Listeners string `xml:"listeners"`
		Images    []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"trackmatches>track"`
}

track.search

type TrackUpdateNowPlaying

type TrackUpdateNowPlaying struct {
	XMLName xml.Name `xml:"nowplaying"`
	Track   struct {
		Corrected string `xml:"corrected,attr"`
		Name      string `xml:",chardata"`
	} `xml:"track"`
	Artist struct {
		Corrected string `xml:"corrected,attr"`
		Name      string `xml:",chardata"`
	} `xml:"artist"`
	Album struct {
		Corrected string `xml:"corrected,attr"`
		Name      string `xml:",chardata"`
	} `xml:"album"`
	AlbumArtist struct {
		Corrected string `xml:"corrected,attr"`
		Name      string `xml:",chardata"`
	} `xml:"albumArtist"`
	IgnoredMessage struct {
		Corrected string `xml:"corrected,attr"`
		Body      string `xml:",chardata"`
	} `xml:"ignoredMessage"`
}

track.updateNowPlaying

type UserGetArtistTracks

type UserGetArtistTracks struct {
	User       string `xml:"user,attr"`
	Artist     string `xml:"artist,attr"`
	Items      string `xml:"items,attr"`
	Total      int    `xml:"total,attr"`
	Page       int    `xml:"page,attr"`
	PerPage    int    `xml:"perPage,attr"`
	TotalPages int    `xml:"totalPages,attr"`
	Tracks     []struct {
		Artist struct {
			Mbid string `xml:"mbid,attr"`
			Name string `xml:",chardata"`
		} `xml:"artist"`
		Name       string `xml:"name"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:",chardata"`
		} `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 string `xml:"uts,attr"`
			Str string `xml:",chardata"`
		} `xml:"date"`
	} `xml:"track"`
}

user.getArtistTracks

type UserGetFriends

type UserGetFriends struct {
	XMLName    xml.Name `xml:"friends"`
	For        string   `xml:"for,attr"` //username
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Friends    []struct {
		Id         string `xml:"id"`
		Name       string `xml:"name"`
		RealName   string `xml:"realname"`
		Url        string `xml:"url"`
		Country    string `xml:"country"`
		Age        string `xml:"age"`
		Gender     string `xml:"gender"`
		Subscriber string `xml:"subscriber"`
		Type       string `xml:"type"`
		PlayCount  string `xml:"playcount"`
		Playlists  string `xml:"playlists"`
		Bootstrap  string `xml:"bootstrap"` // ?
		Registered struct {
			Unixtime string `xml:"unixtime,attr"`
			Time     string `xml:",chardata"`
		} `xml:"registered"`
		Images []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
		ScrobbleSource struct {
			Name  string `xml:"name"`
			Image string `xml:"image"`
			Url   string `xml:"url"`
		} `xml:"scrobblesource"`
		RecentTrack struct {
			Date   string `xml:"date,attr"`
			Uts    string `xml:"uts,attr"`
			Artist struct {
				Name string `xml:"name"`
				Mbid string `xml:"mbid"`
				Url  string `xml:"url"`
			} `xml:"artist"`
			Album struct {
				Name string `xml:"name"`
				Mbid string `xml:"mbid"`
				Url  string `xml:"url"`
			} `xml:"album"`
			Name string `xml:"name"`
			Mbid string `xml:"mbid"`
			Url  string `xml:"url"`
		} `xml:"recenttrack"`
	} `xml:"user"`
}

user.getFriends

type UserGetInfo

type UserGetInfo struct {
	XMLName    xml.Name `xml:"user"`
	Id         string   `xml:"id"`
	Name       string   `xml:"name"`
	RealName   string   `xml:"realname"`
	Url        string   `xml:"url"`
	Country    string   `xml:"country"`
	Age        string   `xml:"age"`
	Gender     string   `xml:"gender"`
	Subscriber string   `xml:"subscriber"`
	PlayCount  string   `xml:"playcount"`
	Playlists  string   `xml:"playlists"`
	Bootstrap  string   `xml:"bootstrap"`
	Registered struct {
		Unixtime string `xml:"unixtime,attr"`
		Time     string `xml:",chardata"`
	} `xml:"registered"`
	Type   string `xml:"type"` //user type: stuff, moderator, user...
	Images []struct {
		Size string `xml:"size,attr"`
		Url  string `xml:",chardata"`
	} `xml:"image"`
}

user.getInfo

type UserGetLovedTracks

type UserGetLovedTracks struct {
	XMLName    xml.Name `xml:"lovedtracks"`
	User       string   `xml:"user,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Name string `xml:"name"`
		Mbid string `xml:"mbid"`
		Url  string `xml:"url"`
		Date struct {
			Uts  string `xml:"uts,attr"`
			Date 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  string `xml:"fulltrack,attr"`
			Streamable string `xml:",chardata"`
		} `xml:"streamable"`
	} `xml:"track"`
}

user.getLovedTracks

type UserGetPersonalTags

type UserGetPersonalTags struct {
	XMLName    xml.Name `xml:"taggings"`
	User       string   `xml:"user,attr"`
	Tag        string   `xml:"tag,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Artists    []struct {
		Name       string `xml:"name"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable string `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       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `xml:"streamable"`
		} `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:"tracks>track"`
}

user.getPersonalTags

type UserGetRecentTracks

type UserGetRecentTracks struct {
	XMLName    xml.Name `xml:"recenttracks"`
	User       string   `xml:"user,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		NowPlaying string `xml:"nowplaying,attr,omitempty"`
		Artist     struct {
			Name string `xml:",chardata"`
			Mbid string `xml:"mbid,attr"`
		} `xml:"artist"`
		Name       string `xml:"name"`
		Streamable string `xml:"streamable"`
		Mbid       string `xml:"mbid"`
		Album      struct {
			Name string `xml:",chardata"`
			Mbid string `xml:"mbid,attr"`
		} `xml:"album"`
		Url    string `xml:"url"`
		Images []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
		Date struct {
			Uts  string `xml:"uts,attr"`
			Date string `xml:",chardata"`
		} `xml:"date"`
	} `xml:"track"`
}

user.getRecentTracks

type UserGetTopAlbums

type UserGetTopAlbums struct {
	XMLName    xml.Name `xml:"topalbums"`
	User       string   `xml:"user,attr"`
	Type       string   `xml:"type,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Albums     []struct {
		Rank      string `xml:"rank,attr"`
		Name      string `xml:"name"`
		PlayCount string `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"`
}

user.getTopAlbums

type UserGetTopArtists

type UserGetTopArtists struct {
	XMLName    xml.Name `xml:"topartists"`
	User       string   `xml:"user,attr"`
	Type       string   `xml:"type,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Artists    []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		PlayCount  string `xml:"playcount"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable string `xml:"streamable"`
		Images     []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
	} `xml:"artist"`
}

user.getTopArtists

type UserGetTopTags

type UserGetTopTags struct {
	XMLName xml.Name `xml:"toptags"`
	User    string   `xml:"user,attr"`
	Tags    []struct {
		Name  string `xml:"name"`
		Count string `xml:"count"`
		Url   string `xml:"url"`
	} `xml:"tag"`
}

user.getTopTags

type UserGetTopTracks

type UserGetTopTracks struct {
	XMLName    xml.Name `xml:"toptracks"`
	User       string   `xml:"user,attr"`
	Type       string   `xml:"type,attr"`
	Total      int      `xml:"total,attr"`
	Page       int      `xml:"page,attr"`
	PerPage    int      `xml:"perPage,attr"`
	TotalPages int      `xml:"totalPages,attr"`
	Tracks     []struct {
		Rank       string `xml:"rank,attr"`
		Name       string `xml:"name"`
		Duration   string `xml:"duration"`
		PlayCount  string `xml:"playcount"`
		Mbid       string `xml:"mbid"`
		Url        string `xml:"url"`
		Streamable struct {
			FullTrack  string `xml:"fulltrack,attr"`
			Streamable string `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"`
}

user.getTopTracks

type UserGetWeeklyAlbumChart

type UserGetWeeklyAlbumChart struct {
	XMLName xml.Name `xml:"weeklyalbumchart"`
	User    string   `xml:"user,attr"`
	From    string   `xml:"from,attr"`
	To      string   `xml:"to,attr"`
	Albums  []struct {
		Rank      string `xml:"rank,attr"`
		Name      string `xml:"name"`
		Mbid      string `xml:"mbid"`
		PlayCount string `xml:"playcount"`
		Url       string `xml:"url"`
	} `xml:"album"`
}

user.getWeeklyAlbumChart

type UserGetWeeklyArtistChart

type UserGetWeeklyArtistChart struct {
	XMLName xml.Name `xml:"weeklyartistchart"`
	User    string   `xml:"user,attr"`
	From    string   `xml:"from,attr"`
	To      string   `xml:"to,attr"`
	Artists []struct {
		Rank      string `xml:"rank,attr"`
		Name      string `xml:"name"`
		Mbid      string `xml:"mbid"`
		PlayCount string `xml:"playcount"`
		Url       string `xml:"url"`
	} `xml:"artist"`
}

user.getWeeklyArtistChart

type UserGetWeeklyChartList

type UserGetWeeklyChartList struct {
	XMLName xml.Name `xml:"weeklychartlist"`
	User    string   `xml:"user,attr"`
	Charts  []struct {
		From string `xml:"from,attr"`
		To   string `xml:"to,attr"`
	} `xml:"chart"`
}

user.getWeeklyChartList

type UserGetWeeklyTrackChart

type UserGetWeeklyTrackChart struct {
	XMLName xml.Name `xml:"weeklytrackchart"`
	User    string   `xml:"user,attr"`
	From    string   `xml:"from,attr"`
	To      string   `xml:"to,attr"`
	Tracks  []struct {
		Rank   string `xml:"rank,attr"`
		Artist struct {
			Name string `xml:",chardata"`
			Mbid string `xml:"mbid,attr"`
		} `xml:"artist"`
		Name      string `xml:"name"`
		Mbid      string `xml:"mbid"`
		PlayCount string `xml:"playcount"`
		Images    []struct {
			Size string `xml:"size,attr"`
			Url  string `xml:",chardata"`
		} `xml:"image"`
		Url string `xml:"url"`
	} `xml:"track"`
}

user.getWeeklyTrackChart

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL