forked from shkh/lastfm-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
track_result.go
209 lines (196 loc) · 5.47 KB
/
track_result.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
package lastfm_go
import "encoding/xml"
//track.addTags (empty)
// track.getCorrection
type TrackGetCorrection struct {
XMLName xml.Name `xml:"corrections"`
Correction struct {
Index string `xml:"index,attr"`
ArtistCorrected string `xml:"artistcorrected"`
TrackCorrected string `xml:"trackcorrected"`
Track struct {
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
Artist struct {
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
} `xml:"artist"`
} `xml:"track"`
} `xml:"correction"`
}
// track.getInfo
type TrackGetInfo struct {
XMLName xml.Name `xml:"track"`
Id string `xml:"id"`
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
Duration string `xml:"duration"`
Streamable struct {
FullTrack string `xml:"fulltrack,attr"`
Streamable string `xml:",chardata"`
} `xml:"streamable"`
PlayCount string `xml:"playcount"`
UserPlayCount string `xml:"userplaycount"`
UserLoved string `xml:"userloved"`
Artist struct {
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
} `xml:"artist"`
Album struct {
Position string `xml:"position,attr"`
Artist string `xml:"artist"`
Title string `xml:"title"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
Images []struct {
Size string `xml:"size,attr"`
Url string `xml:",chardata"`
} `xml:"image"`
} `xml:"album"`
TopTags []struct {
Name string `xml:"name"`
Url string `xml:"url"`
} `xml:"toptags>tag"`
Wiki struct {
Published string `xml:"published"`
Summary string `xml:"summary"`
Content string `xml:"content"`
} `xml:"wiki"`
}
// track.getSimilar
type TrackGetSimilar struct {
XMLName xml.Name `xml:"similartracks"`
Track string `xml:"track,attr"`
Artist string `xml:"artist,attr"`
Tracks []struct {
Name string `xml:"name"`
PlayCount string `xml:"playcount"`
Mbid string `xml:"mbid"`
Match string `xml:"match"`
Url string `xml:"url"`
Streamable struct {
FullTrack string `xml:"fulltrack,attr"`
Streamable string `xml:",chardata"`
} `xml:"streamable"`
Duration string `xml:"duration"`
Artist struct {
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Url string `xml:"url"`
} `xml:"artist"`
Images []struct {
Size string `xml:"size,attr"`
Url string `xml:",chardata"`
} `xml:"image"`
} `xml:"track"`
}
// track.getTags
type TrackGetTags struct {
XMLName xml.Name `xml:"tags"`
Artist string `xml:"artist,attr"`
Track string `xml:"track,attr"`
Tags []struct {
Name string `xml:"name"`
Url string `xml:"url"`
} `xml:"tag"`
}
// track.getTopTags
type TrackGetTopTags struct {
XMLName xml.Name `xml:"toptags"`
Artist string `xml:"artist,attr"`
Track string `xml:"track,attr"`
Tags []struct {
Name string `xml:"name"`
Count string `xml:"count"`
Url string `xml:"url"`
} `xml:"tag"`
}
//track.love (empty)
//track.removeTag (empty)
// track.scrobble
type TrackScrobble struct {
XMLName xml.Name `xml:"scrobbles"`
Accepted string `xml:"accepted,attr"`
Ignored string `xml:"ignored,attr"`
Scrobbles []struct {
Track struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"track"`
Artist struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Album struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"album"`
AlbumArtist struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"albumArtist"`
TimeStamp string `xml:"timestamp"`
IgnoredMessage struct {
Corrected string `xml:"corrected,attr"`
Body string `xml:",chardata"`
} `xml:"ignoredMessage"`
} `xml:"scrobble"`
}
// track.search
type TrackSearch struct {
XMLName xml.Name `xml:"results"`
OpenSearch string `xml:"opensearch,attr"`
For string `xml:"for,attr"`
Query struct {
Role string `xml:"role,attr"`
SearchTerms string `xml:"searchTrems,attr"`
StartPage int `xml:"startPage,attr"`
} `xml:"Query"`
TotalResults int `xml:"totalResults"`
StartIndex int `xml:"startIndex"`
ItemsPerPage int `xml:"itemsPerPage"`
Tracks []struct {
Name string `xml:"name"`
Mbid string `xml:"mbid"`
Artist string `xml:"artist"`
Url string `xml:"url"`
Streamable struct {
FullTrack string `xml:"fulltrack,attr"`
Streamable string `xml:"streamable"`
} `xml:"streamable"`
Listeners string `xml:"listeners"`
Images []struct {
Size string `xml:"size,attr"`
Url string `xml:",chardata"`
} `xml:"image"`
} `xml:"trackmatches>track"`
}
//track.unlove (empty)
// track.updateNowPlaying
type TrackUpdateNowPlaying struct {
XMLName xml.Name `xml:"nowplaying"`
Track struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"track"`
Artist struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"artist"`
Album struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"album"`
AlbumArtist struct {
Corrected string `xml:"corrected,attr"`
Name string `xml:",chardata"`
} `xml:"albumArtist"`
IgnoredMessage struct {
Corrected string `xml:"corrected,attr"`
Body string `xml:",chardata"`
} `xml:"ignoredMessage"`
}