-
Notifications
You must be signed in to change notification settings - Fork 89
/
shoutout.go
27 lines (22 loc) · 862 Bytes
/
shoutout.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
package helix
type SendShoutoutParams struct {
FromBroadcasterID string `query:"from_broadcaster_id"` // required
ToBroadcasterID string `query:"to_broadcaster_id"` // required
ModeratorID string `query:"moderator_id"` // required
}
type SendShoutoutResponse struct {
ResponseCommon
}
// SendShoutout sends a Shoutout to the specified broadcaster.
// Required scope: moderator:manage:shoutouts
// The broadcaster may send a Shoutout once every 2 minutes.
// They may send the same broadcaster a Shoutout once every 60 minutes.
func (c *Client) SendShoutout(params *SendShoutoutParams) (*SendShoutoutResponse, error) {
resp, err := c.post("/chat/shoutouts", nil, params)
if err != nil {
return nil, err
}
shoutoutResp := &SendShoutoutResponse{}
resp.HydrateResponseCommon(&shoutoutResp.ResponseCommon)
return shoutoutResp, nil
}