-
Notifications
You must be signed in to change notification settings - Fork 1
/
callback.go
59 lines (49 loc) · 1.61 KB
/
callback.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 tgstat_go
type SetCallbackSuccessResult struct {
Status string `json:"status"`
}
type SetCallbackVerificationResult struct {
Status string `json:"status"`
Error string `json:"error"`
VerifyCode string `json:"verify_code"`
}
type GetCallbackResponse struct {
Status string `json:"status"`
Response CallbackResponse `json:"response"`
}
type CallbackResponse struct {
Url string `json:"url"`
PendingUpdateCount int `json:"pending_update_count"`
LastErrorDate int `json:"last_error_date"`
LastErrorMessage string `json:"last_error_message"`
}
type Subscribe struct {
Status string `json:"status"`
Response SubscribeResponse `json:"response"`
}
type SubscribeResponse struct {
SubscriptionId int `json:"subscription_id"`
}
type SubscriptionList struct {
Status string `json:"status"`
Response SubscriptionListResponse `json:"response"`
}
type SubscriptionListResponse struct {
TotalCount int `json:"total_count"`
Subscriptions []Subscription `json:"subscriptions"`
}
type Subscription struct {
SubscriptionId int `json:"subscription_id"`
EventTypes []string `json:"event_types"`
Type string `json:"type"`
Channel Channel `json:"channel,omitempty"`
CreatedAt int `json:"created_at"`
Keyword Keyword `json:"keyword,omitempty"`
}
type Keyword struct {
Q string `json:"q"`
StrongSearch bool `json:"strong_search"`
MinusWords string `json:"minus_words"`
ExtendedSyntax bool `json:"extended_syntax"`
PeerTypes string `json:"peer_types"`
}