mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: add lastfm route and workers
This commit is contained in:
parent
03d040a18d
commit
4fd340bf22
8 changed files with 128 additions and 1 deletions
27
internal/model/lastfm.go
Normal file
27
internal/model/lastfm.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package model
|
||||
|
||||
type LastFMAPI struct {
|
||||
RecentTracks struct {
|
||||
TrackList []struct {
|
||||
Artist struct {
|
||||
Text string `json:"#text"`
|
||||
} `json:"artist"`
|
||||
Name string `json:"name"`
|
||||
Image []struct {
|
||||
Text string `json:"#text"`
|
||||
} `json:"image"`
|
||||
Url string `json:"url"`
|
||||
Attributes *struct {
|
||||
NowPlaying string `json:"nowplaying"`
|
||||
} `json:"@attr,omitempty"`
|
||||
} `json:"track"`
|
||||
} `json:"recenttracks"`
|
||||
}
|
||||
|
||||
type LastFMData struct {
|
||||
Song string `json:"song"`
|
||||
Artist string `json:"artist"`
|
||||
Image string `json:"image"`
|
||||
Url string `json:"url"`
|
||||
Playing bool `json:"playing"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue