forked from shkh/lastfm-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.go
59 lines (52 loc) · 1.71 KB
/
event.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
package lastfm
type eventApi struct {
params *apiParams
}
//Event.attend
func (api eventApi) Attend(args map[string]interface{}) (err error) {
defer func() { appendCaller(err, "lastfm.Event.Attend") }()
err = callPost("event.attend", api.params, args, nil, P{
"plain": []string{"event", "status"},
})
return
}
//Event.getAttendees
func (api eventApi) GetAttendees(args map[string]interface{}) (result EventGetAttendees, err error) {
defer func() { appendCaller(err, "lastfm.Event.GetAttendees") }()
err = callPost("event.attendees", api.params, args, nil, P{
"plain": []string{"event", "page", "limit"},
})
return
}
//Event.getInfo
func (api eventApi) GetInfo(args map[string]interface{}) (result EventGetInfo, err error) {
defer func() { appendCaller(err, "lastfm.Event.GetInfo") }()
err = callGet("event.getinfo", api.params, args, &result, P{
"plain": []string{"event"},
})
return
}
//Event.getShouts
func (api eventApi) GetShouts(args map[string]interface{}) (result EventGetShouts, err error) {
defer func() { appendCaller(err, "lastfm.Event.GetShouts") }()
err = callGet("event.getshouts", api.params, args, &result, P{
"plain": []string{"event", "page", "limit"},
})
return
}
//Event.share
func (api eventApi) Share(args map[string]interface{}) (err error) {
defer func() { appendCaller(err, "lastfm.Event.Share") }()
err = callPost("event.share", api.params, args, nil, P{
"plain": []string{"event", "public", "message", "recipient"},
})
return
}
//Event.shout
func (api eventApi) Shout(args map[string]interface{}) (err error) {
defer func() { appendCaller(err, "lastfm.Event.Shout") }()
err = callPost("event.shout", api.params, args, nil, P{
"plain": []string{"event", "message"},
})
return
}