add basic lastfm hook

This commit is contained in:
sentriz
2019-04-17 21:36:40 +01:00
parent 9f6cd20f5a
commit 4cd9c0c39c
17 changed files with 199 additions and 33 deletions

21
lastfm/models.go Normal file
View File

@@ -0,0 +1,21 @@
package lastfm
import "encoding/xml"
type LastFM struct {
XMLName xml.Name `xml:"lfm"`
Status string `xml:"status,attr"`
Session *Session `xml:"session"`
Error *Error `xml:"error"`
}
type Session struct {
Name string `xml:"name"`
Key string `xml:"key"`
Subscriber uint `xml:"subscriber"`
}
type Error struct {
Code uint `xml:"code,attr"`
Value string `xml:",chardata"`
}