File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,31 @@ impl LineBot {
3838 }
3939 }
4040
41+ // webhook-settings
42+
43+ pub fn update_webhook_endpoint ( & self , endpoint : & str ) -> Result < Response , Error > {
44+ let data: Value = json ! (
45+ {
46+ "endpoint" : endpoint,
47+ }
48+ ) ;
49+ self . http_client . put ( "/channel/webhook/endpoint" , data)
50+ }
51+
52+ pub fn get_webhook_endpoint ( & self ) -> Result < Response , Error > {
53+ self . http_client
54+ . get ( "/channel/webhook/endpoint" , vec ! [ ] , json ! ( { } ) )
55+ }
56+
57+ pub fn test_webhook_endpoint ( & self , endpoint : & str ) -> Result < Response , Error > {
58+ let data: Value = json ! (
59+ {
60+ "endpoint" : endpoint,
61+ }
62+ ) ;
63+ self . http_client . post ( "/channel/webhook/test" , data)
64+ }
65+
4166 // messages
4267
4368 pub fn reply_message (
You can’t perform that action at this time.
0 commit comments