9
9
//only one webhook URL can be registered to an application.
10
10
//https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks
11
11
func (a TwitterApi ) GetActivityWebhooks (v url.Values ) (u []WebHookResp , err error ) {
12
- v = cleanValues (v )
13
12
responseCh := make (chan response )
14
13
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks.json" , v , & u , _GET , responseCh }
15
14
return u , (<- responseCh ).err
@@ -30,7 +29,6 @@ type WebHookResp struct {
30
29
//Only one webhook URL can be registered to an application.
31
30
//https://api.twitter.com/1.1/account_activity/webhooks.json
32
31
func (a TwitterApi ) SetActivityWebhooks (v url.Values ) (u []WebHookResp , err error ) {
33
- v = cleanValues (v )
34
32
responseCh := make (chan response )
35
33
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks.json" , v , & u , _POST , responseCh }
36
34
return u , (<- responseCh ).err
@@ -39,7 +37,6 @@ func (a TwitterApi) SetActivityWebhooks(v url.Values) (u []WebHookResp, err erro
39
37
//DeleteActivityWebhooks Removes the webhook from the provided application’s configuration.
40
38
//https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks
41
39
func (a TwitterApi ) DeleteActivityWebhooks (v url.Values , webhookID string ) (u interface {}, err error ) {
42
- v = cleanValues (v )
43
40
responseCh := make (chan response )
44
41
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks/" + webhookID + ".json" , v , & u , _DELETE , responseCh }
45
42
return u , (<- responseCh ).err
@@ -48,7 +45,6 @@ func (a TwitterApi) DeleteActivityWebhooks(v url.Values, webhookID string) (u in
48
45
//PutActivityWebhooks update webhook which reenables the webhook by setting its status to valid.
49
46
//https://dev.twitter.com/webhooks/reference/put/account_activity/webhooks
50
47
func (a TwitterApi ) PutActivityWebhooks (v url.Values , webhookID string ) (u interface {}, err error ) {
51
- v = cleanValues (v )
52
48
responseCh := make (chan response )
53
49
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks/" + webhookID + ".json" , v , & u , _PUT , responseCh }
54
50
return u , (<- responseCh ).err
@@ -58,7 +54,6 @@ func (a TwitterApi) PutActivityWebhooks(v url.Values, webhookID string) (u inter
58
54
//When subscribed, all DM events for the provided user will be sent to the app’s webhook via POST request.
59
55
//https://dev.twitter.com/webhooks/reference/post/account_activity/webhooks/subscriptions
60
56
func (a TwitterApi ) SetWHSubscription (v url.Values , webhookID string ) (u interface {}, err error ) {
61
- v = cleanValues (v )
62
57
responseCh := make (chan response )
63
58
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks/" + webhookID + "/subscriptions.json" , v , & u , _POST , responseCh }
64
59
return u , (<- responseCh ).err
@@ -68,7 +63,6 @@ func (a TwitterApi) SetWHSubscription(v url.Values, webhookID string) (u interfa
68
63
//subscribed to the provided user’s Direct Messages.
69
64
//https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks/subscriptions
70
65
func (a TwitterApi ) GetWHSubscription (v url.Values , webhookID string ) (u interface {}, err error ) {
71
- v = cleanValues (v )
72
66
responseCh := make (chan response )
73
67
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks/" + webhookID + "/subscriptions.json" , v , & u , _GET , responseCh }
74
68
return u , (<- responseCh ).err
@@ -78,7 +72,6 @@ func (a TwitterApi) GetWHSubscription(v url.Values, webhookID string) (u interfa
78
72
//all DM events for the requesting user will no longer be sent to the webhook URL..
79
73
//https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks
80
74
func (a TwitterApi ) DeleteWHSubscription (v url.Values , webhookID string ) (u interface {}, err error ) {
81
- v = cleanValues (v )
82
75
responseCh := make (chan response )
83
76
a .queryQueue <- query {a .baseUrl + "/account_activity/webhooks/" + webhookID + "/subscriptions.json" , v , & u , _DELETE , responseCh }
84
77
return u , (<- responseCh ).err
0 commit comments