lastfm

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album added in v0.49.0

type Album struct {
	Name        string          `json:"name"`
	MBID        string          `json:"mbid"`
	URL         string          `json:"url"`
	Image       []ExternalImage `json:"image"`
	Description Description     `json:"wiki"`
}

type Artist

type Artist struct {
	Name  string          `json:"name"`
	MBID  string          `json:"mbid"`
	URL   string          `json:"url"`
	Image []ExternalImage `json:"image"`
	Bio   Description     `json:"bio"`
}

type Attr

type Attr struct {
	Artist string `json:"artist"`
}

type Description added in v0.49.0

type Description struct {
	Published string `json:"published"`
	Summary   string `json:"summary"`
	Content   string `json:"content"`
}

type ExternalImage added in v0.49.0

type ExternalImage struct {
	URL  string `json:"#text"`
	Size string `json:"size"`
}

type NowPlaying

type NowPlaying struct {
	Artist struct {
		Corrected string `json:"corrected"`
		Text      string `json:"#text"`
	} `json:"artist"`
	IgnoredMessage struct {
		Code string `json:"code"`
		Text string `json:"#text"`
	} `json:"ignoredMessage"`
	Album struct {
		Corrected string `json:"corrected"`
		Text      string `json:"#text"`
	} `json:"album"`
	AlbumArtist struct {
		Corrected string `json:"corrected"`
		Text      string `json:"#text"`
	} `json:"albumArtist"`
	Track struct {
		Corrected string `json:"corrected"`
		Text      string `json:"#text"`
	} `json:"track"`
}

type Response

type Response struct {
	Artist         Artist         `json:"artist"`
	SimilarArtists SimilarArtists `json:"similarartists"`
	TopTracks      TopTracks      `json:"toptracks"`
	Album          Album          `json:"album"`
	Error          int            `json:"error"`
	Message        string         `json:"message"`
	Token          string         `json:"token"`
	Session        Session        `json:"session"`
	NowPlaying     NowPlaying     `json:"nowplaying"`
	Scrobbles      Scrobbles      `json:"scrobbles"`
}

type Router

type Router struct {
	http.Handler
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(ds model.DataStore) *Router

type ScrobbleInfo

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

type Scrobbles

type Scrobbles struct {
	Attr struct {
		Accepted int `json:"accepted"`
		Ignored  int `json:"ignored"`
	} `json:"@attr"`
	Scrobble struct {
		Artist struct {
			Corrected string `json:"corrected"`
			Text      string `json:"#text"`
		} `json:"artist"`
		IgnoredMessage struct {
			Code string `json:"code"`
			Text string `json:"#text"`
		} `json:"ignoredMessage"`
		AlbumArtist struct {
			Corrected string `json:"corrected"`
			Text      string `json:"#text"`
		} `json:"albumArtist"`
		Timestamp string `json:"timestamp"`
		Album     struct {
			Corrected string `json:"corrected"`
			Text      string `json:"#text"`
		} `json:"album"`
		Track struct {
			Corrected string `json:"corrected"`
			Text      string `json:"#text"`
		} `json:"track"`
	} `json:"scrobble"`
}

type Session

type Session struct {
	Name       string `json:"name"`
	Key        string `json:"key"`
	Subscriber int    `json:"subscriber"`
}

type SimilarArtists

type SimilarArtists struct {
	Artists []Artist `json:"artist"`
	Attr    Attr     `json:"@attr"`
}

type TopTracks

type TopTracks struct {
	Track []Track `json:"track"`
	Attr  Attr    `json:"@attr"`
}

type Track

type Track struct {
	Name string `json:"name"`
	MBID string `json:"mbid"`
}

Jump to

Keyboard shortcuts

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