Documentation
¶
Index ¶
- func CreateCollage(ctx context.Context, displayOptions DisplayOptions, ...) (image.Image, *bytes.Buffer, error)
- func DownloadImage(ctx context.Context, url string) (io.ReadCloser, string, error)
- func DownloadImageWithRetry(ctx context.Context, url string) (io.ReadCloser, string, error)
- func GetElementsForAlbum(ctx context.Context, username string, period lastfm.Period, count int, ...) error
- func GetElementsForArtist(ctx context.Context, username string, period lastfm.Period, count int, ...) error
- func GetElementsForTrack(ctx context.Context, username string, period lastfm.Period, count int, ...) error
- type Album
- type Artist
- type CollageElement
- type DisplayOptions
- type LastfmAlbum
- type LastfmArtist
- type LastfmTopAlbums
- type LastfmTopArtists
- type LastfmTopTracks
- type LastfmTrack
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCollage ¶
func CreateCollage( ctx context.Context, displayOptions DisplayOptions, jobChan <-chan CollageElement, ) (image.Image, *bytes.Buffer, error)
func DownloadImage ¶
func DownloadImageWithRetry ¶
func GetElementsForAlbum ¶
func GetElementsForAlbum( ctx context.Context, username string, period lastfm.Period, count int, imageSize string, displayOptions DisplayOptions, jobChan chan<- CollageElement, ) error
func GetElementsForArtist ¶
func GetElementsForArtist( ctx context.Context, username string, period lastfm.Period, count int, imageSize string, displayOptions DisplayOptions, jobChan chan<- CollageElement, ) error
func GetElementsForTrack ¶
func GetElementsForTrack( ctx context.Context, username string, period lastfm.Period, count int, imageSize string, displayOptions DisplayOptions, jobChan chan<- CollageElement, ) error
Types ¶
type Album ¶
type Album struct {
ImageUrl string
Artist string
Name string
Playcound string
ImageSize string
Mbid string
Playcount string
}
func (*Album) CacheEntry ¶
func (a *Album) CacheEntry() cache.CacheEntry
func (*Album) Identifier ¶
func (*Album) Parameters ¶
type Artist ¶
type Artist struct {
Name string
Playcount string
ImageUrl string
Mbid string
ImageSize string
Url string
}
func (*Artist) CacheEntry ¶
func (a *Artist) CacheEntry() cache.CacheEntry
func (*Artist) Identifier ¶
func (*Artist) Parameters ¶
type CollageElement ¶
type DisplayOptions ¶
type LastfmAlbum ¶
type LastfmAlbum struct {
Artist struct {
URL string `json:"url"`
ArtistName string `json:"name"`
Mbid string `json:"mbid"`
} `json:"artist"`
Mbid string `json:"mbid"`
URL string `json:"url"`
Playcount string `json:"playcount"`
Attr struct {
Rank string `json:"rank"`
} `json:"@attr"`
AlbumName string `json:"name"`
Images []lastfm.LastfmImage `json:"image"`
}
type LastfmArtist ¶
type LastfmTopAlbums ¶
type LastfmTopAlbums struct {
TopAlbums struct {
Attr lastfm.LastfmUser `json:"@attr"`
Albums []LastfmAlbum `json:"album"`
} `json:"topalbums"`
}
type LastfmTopArtists ¶
type LastfmTopArtists struct {
TopArtists struct {
Attr lastfm.LastfmUser `json:"@attr"`
Artists []LastfmArtist `json:"artist"`
} `json:"topartists"`
}
type LastfmTopTracks ¶
type LastfmTopTracks struct {
TopTracks struct {
Attr lastfm.LastfmUser `json:"@attr"`
Tracks []LastfmTrack `json:"track"`
} `json:"toptracks"`
}
type LastfmTrack ¶
type LastfmTrack struct {
Artist struct {
URL string `json:"url"`
Name string `json:"name"`
Mbid string `json:"mbid"`
} `json:"artist"`
Mbid string `json:"mbid"`
Name string `json:"name"`
URL string `json:"url"`
Duration string `json:"duration"`
Attr struct {
Rank string `json:"rank"`
} `json:"@attr"`
Playcount string `json:"playcount"`
Images []lastfm.LastfmImage `json:"image"`
}
type Track ¶
type Track struct {
Name string
Artist string
Playcount string
Album string
ImageUrl string
Mbid string
ImageSize string
}
func (*Track) CacheEntry ¶
func (t *Track) CacheEntry() cache.CacheEntry
func (*Track) Identifier ¶
func (*Track) Parameters ¶
Click to show internal directories.
Click to hide internal directories.