-
Notifications
You must be signed in to change notification settings - Fork 21
/
response.go
45 lines (38 loc) · 1.36 KB
/
response.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
package types
import "github.com/michimani/gotwi/resources"
// ListsOutput is struct for response of `GET /2/users/:id/muting`.
// more information: https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/get-users-muting
// more information:
type ListsOutput struct {
Data []resources.User `json:"data"`
Meta resources.PaginationMeta `json:"meta"`
Includes struct {
Tweets []resources.Tweet `json:"tweets"`
} `json:"includes"`
Errors []resources.PartialError `json:"errors"`
}
func (r *ListsOutput) HasPartialError() bool {
return !(r.Errors == nil || len(r.Errors) == 0)
}
// CreateOutput is struct for response of `POST /2/users/:id/muting`.
// more information: https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/post-users-user_id-muting
// more information:
type CreateOutput struct {
Data struct {
Muting bool `json:"muting"`
} `json:"data"`
}
func (r *CreateOutput) HasPartialError() bool {
return false
}
// DeleteOutput is struct for response of `DELETE /2/users/:source_user_id/muting/:target_user_id`.
// more information: https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/delete-users-user_id-muting
// more information:
type DeleteOutput struct {
Data struct {
Muting bool `json:"muting"`
} `json:"data"`
}
func (r *DeleteOutput) HasPartialError() bool {
return false
}