Commit d244d53d87a97d6d88bdaf283a16562f3e1d5c38

Authored by Jeff Lai
1 parent b1034954
Exists in master

Add dingtalk micro app api

lib/dingtalk/api/micro_app.rb 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +module Dingtalk
  2 + module Api
  3 + class MicroApp < Base
  4 + def visible_scopes(agent_id)
  5 + http_post("visible_scopes?access_token=#{access_token}", { agentId: agent_id })
  6 + end
  7 +
  8 + private
  9 + def base_url
  10 + 'microapp'
  11 + end
  12 + end
  13 + end
  14 +end
  15 +
  16 +
... ...
lib/dingtalk/client.rb
... ... @@ -63,6 +63,10 @@ module Dingtalk
63 63 Api::Message.new(@corp_id, @permanent_code)
64 64 end
65 65  
  66 + def micro_app
  67 + Api::MicroApp.new(@corp_id, @permanent_code)
  68 + end
  69 +
66 70 private
67 71 def aes_key
68 72 Base64.decode64(Dingtalk.suite_aes_key + '=')
... ...