lastfm

package
v0.0.0-...-56d3c23 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageIdForArtist

func GetImageIdForArtist(ctx context.Context, artistUrl string) (string, error)

func GetLastFmResponse

func GetLastFmResponse(
	ctx context.Context,
	collageType constants.CollageType,
	username string,
	period constants.Period,
	count int,
	handler func(data []byte) (int, int, error),
) error

func GetTrackInfo

func GetTrackInfo(
	trackName string,
	artistName string,
	imageSize string,
) (clients.TrackInfo, error)

Types

type CleanError

type CleanError struct {
	// contains filtered or unexported fields
}

func (CleanError) Error

func (e CleanError) Error() string

type GetTrackInfoResponse

type GetTrackInfoResponse struct {
	Track struct {
		Album struct {
			AlbumName string        `json:"title"`
			Images    []LastfmImage `json:"image"`
		} `json:"Album"`
	} `json:"track"`
}

type LastfmImage

type LastfmImage struct {
	Size string `json:"size"`
	Link string `json:"#text"`
}

type LastfmUser

type LastfmUser struct {
	User       string `json:"user"`
	TotalPages string `json:"totalPages"`
	Page       string `json:"page"`
	PerPage    string `json:"perPage"`
	Total      string `json:"total"`
}

Jump to

Keyboard shortcuts

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