module Wework::Api::Methods::Service
Public Instance Methods
get_admin_list(auth_corpid, agentid)
click to toggle source
# File lib/wework/api/methods/service.rb, line 30 def get_admin_list auth_corpid, agentid post 'service/get_admin_list', {auth_corpid: auth_corpid, agentid: agentid} end
get_auth_info(auth_corpid, permanent_code)
click to toggle source
# File lib/wework/api/methods/service.rb, line 22 def get_auth_info auth_corpid, permanent_code post 'service/get_auth_info', {auth_corpid: auth_corpid, permanent_code: permanent_code} end
get_corp_token(auth_corpid, permanent_code)
click to toggle source
# File lib/wework/api/methods/service.rb, line 26 def get_corp_token auth_corpid, permanent_code post 'service/get_corp_token', {suite_id: suite_id, auth_corpid: auth_corpid, permanent_code: permanent_code} end
get_oauth_userinfo(code)
click to toggle source
# File lib/wework/api/methods/service.rb, line 39 def get_oauth_userinfo(code) get 'service/getuserinfo3rd', params: {access_token: access_token, code: code} end
get_permanent_code(auth_code)
click to toggle source
# File lib/wework/api/methods/service.rb, line 18 def get_permanent_code auth_code post 'service/get_permanent_code', {auth_code: auth_code} end
get_pre_auth_code()
click to toggle source
# File lib/wework/api/methods/service.rb, line 9 def get_pre_auth_code result = get 'service/get_pre_auth_code' return result.pre_auth_code if result.success? end
get_session_with_jscode(js_code, grant_type='authorization_code')
click to toggle source
# File lib/wework/api/methods/service.rb, line 47 def get_session_with_jscode(js_code, grant_type='authorization_code') post 'service/miniprogram/jscode2session', {}, params: {js_code: js_code, grant_type: grant_type} end
get_user_detail(user_ticket)
click to toggle source
# File lib/wework/api/methods/service.rb, line 43 def get_user_detail(user_ticket) post "service/getuserdetail3rd?access_token=#{access_token}", {user_ticket: user_ticket} end
set_session_info(pre_auth_code, session_info={})
click to toggle source
# File lib/wework/api/methods/service.rb, line 14 def set_session_info pre_auth_code, session_info={} post 'service/set_session_info', {pre_auth_code: pre_auth_code, session_info: session_info} end