mirror of
https://github.com/wahyd4/dingtalk.git
synced 2026-08-09 04:45:54 +10:00
Add method to register company callback url.
This commit is contained in:
@@ -7,3 +7,4 @@
|
||||
/pkg/
|
||||
/spec/reports/
|
||||
/tmp/
|
||||
/.idea
|
||||
@@ -0,0 +1,23 @@
|
||||
module Dingtalk
|
||||
module Api
|
||||
class Callback < Base
|
||||
|
||||
def reg_callback url, tags = ['user_add_org', 'user_modify_org', 'user_leave_org', 'org_dept_create', 'org_dept_modify', 'org_dept_remove']
|
||||
params = {
|
||||
call_back_tag: tags,
|
||||
token: Dingtalk.suite_token,
|
||||
aes_key: Dingtalk.suite_aes_key,
|
||||
url: url
|
||||
}
|
||||
http_post("register_call_back?access_token=#{access_token}", params)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def base_url
|
||||
'call_back'
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user