Add method to register company callback url.

This commit is contained in:
Junv
2016-05-19 11:21:03 +08:00
parent ee18fddce9
commit 123e1261d9
2 changed files with 24 additions and 0 deletions
+1
View File
@@ -7,3 +7,4 @@
/pkg/
/spec/reports/
/tmp/
/.idea
+23
View File
@@ -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