-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathresponse.go
More file actions
28 lines (23 loc) · 742 Bytes
/
Copy pathresponse.go
File metadata and controls
28 lines (23 loc) · 742 Bytes
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
package types
import "github.com/michimani/gotwi/resources"
type GetOutput struct {
Data resources.List `json:"data"`
Includes struct {
Users []resources.User `json:"users"`
} `json:"includes,omitempty"`
Errors []resources.PartialError `json:"errors,omitempty"`
}
func (r *GetOutput) HasPartialError() bool {
return !(r.Errors == nil || len(r.Errors) == 0)
}
type ListOwnedOutput struct {
Data []resources.List `json:"data"`
Includes struct {
Users []resources.User `json:"users"`
} `json:"includes,omitempty"`
Meta resources.ListLookupOwnedListsMeta
Errors []resources.PartialError `json:"errors,omitempty"`
}
func (r *ListOwnedOutput) HasPartialError() bool {
return !(r.Errors == nil || len(r.Errors) == 0)
}