Commit 9d238680 by mingyuan

add current platform

parent 5ea2dd5b
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/work-design/rails_com.git
revision: 62d866862c729077c67329a0faf255ebaa49eba2
revision: 45c5d36f3b00416bb719b73bde82cee16338a380
specs:
rails_com (1.2.9)
acme-client
......@@ -30,7 +30,7 @@ GIT
GIT
remote: https://github.com/work-design/rails_extend.git
revision: 9f79c3ba99e3d590841736b4a7855f54035a43cc
revision: 0c2ef4ef6c5538dfeb7df0692012177431d2f59e
specs:
rails_extend (1.0.0)
rails (>= 6.0)
......@@ -251,6 +251,7 @@ GEM
zeitwerk (2.4.2)
PLATFORMS
x86_64-darwin
x86_64-darwin-20
x86_64-linux
......
module Dingtalk::Api
module Inner::Saas
BASE = 'https://openplatform.dg-work.cn'
#BASE = 'https://openplatform.dg-work.cn'
BASE = 'https://openplatform-pro.ding.zj.gov.cn'
def getuserinfo(code)
r = post '/rpc/oauth2/dingtalk_app_user.json', auth_code: code, base: BASE
......
module Dingtalk::Api
class Saas < Base
include Inner::Saas
BASE = 'https://openplatform.dg-work.cn'
#BASE = 'https://openplatform.dg-work.cn'
BASE = 'https://openplatform-pro.ding.zj.gov.cn'
def token
headers = sign_header('POST', '/gettoken.json')
r = @client.post 'gettoken.json', headers: headers, base: BASE
r = @client.post '/gettoken.json', headers: headers, base: BASE
{
'access_token' => r.dig('content', 'data', 'accessToken'),
'expires_in' => r.dig('content', 'data', 'expiresIn')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment