forked from g8rswimmer/go-twitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compliance_batch.go
52 lines (43 loc) · 1.33 KB
/
compliance_batch.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
package twitter
import "net/http"
// ComplianceBatchJobRaw is the raw data from a response
type ComplianceBatchJobRaw struct {
Job *ComplianceBatchJobObj `json:"data"`
}
// CreateComplianceBatchJobOpts are the create compliance batch job options
type CreateComplianceBatchJobOpts struct {
Name string
Resumable bool
}
// CreateComplianceBatchJobResponse is the response from creating a compliance batch job
type CreateComplianceBatchJobResponse struct {
Raw *ComplianceBatchJobRaw
RateLimit *RateLimit
}
// ComplianceBatchJobResponse is the compliance batch job response
type ComplianceBatchJobResponse struct {
Raw *ComplianceBatchJobRaw
RateLimit *RateLimit
}
// ComplianceBatchJobLookupOpts is the compliance batch lookups options
type ComplianceBatchJobLookupOpts struct {
Status ComplianceBatchJobStatus
}
func (c ComplianceBatchJobLookupOpts) addQuery(req *http.Request) {
q := req.URL.Query()
if len(c.Status) > 0 {
q.Add("status", string(c.Status))
}
if len(q) > 0 {
req.URL.RawQuery = q.Encode()
}
}
// ComplianceBatchJobLookupResponse is the response from the compliance batch lookup
type ComplianceBatchJobLookupResponse struct {
Raw *ComplianceBatchJobsRaw
RateLimit *RateLimit
}
// ComplianceBatchJobsRaw is the jobs
type ComplianceBatchJobsRaw struct {
Jobs []*ComplianceBatchJobObj `json:"data"`
}