Commit b67c8d3efd5da0550b2ec3e2d1c50e016f357436

Authored by Tao Huang
1 parent 2d6be54d
Exists in master

Fix corp. Require json

lib/dingtalk.rb
@@ -2,6 +2,7 @@ require "dingtalk/version" @@ -2,6 +2,7 @@ require "dingtalk/version"
2 require "dingtalk/config" 2 require "dingtalk/config"
3 require "dingtalk/pkcs7_encoder" 3 require "dingtalk/pkcs7_encoder"
4 require "dingtalk/prpcrypt" 4 require "dingtalk/prpcrypt"
  5 +require "dingtalk/corp"
5 require "dingtalk/api" 6 require "dingtalk/api"
6 require "dingtalk/client" 7 require "dingtalk/client"
7 8
@@ -12,3 +13,11 @@ module Dingtalk @@ -12,3 +13,11 @@ module Dingtalk
12 ENDPOINT = "https://oapi.dingtalk.com" 13 ENDPOINT = "https://oapi.dingtalk.com"
13 # Your code goes here... 14 # Your code goes here...
14 end 15 end
  16 +
  17 +Dingtalk.configure do |config|
  18 + config.suite_key = 'suiteeazsojmzckxgkw4a'
  19 + config.suite_secret = 'blCId7p9Iy44SyNc2RviaV66-yM7bxis55T197_nIjns1JGJ0CnBSgarLT4lUGK7'
  20 + config.suite_aes_key = 'wsuph070rt8ni8ll8yoe6ccwktz5uk94vnqtnach4zl'
  21 + config.suite_token = 'token'
  22 + config.redis = Redis.new
  23 +end
15 \ No newline at end of file 24 \ No newline at end of file
lib/dingtalk/api/base.rb
  1 +require 'json'
  2 +
1 module Dingtalk 3 module Dingtalk
2 module Api 4 module Api
3 class Base 5 class Base
lib/dingtalk/corp.rb 0 → 100644
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
  1 +module Dingtalk
  2 + class Corp
  3 + attr_accessor :corp_id, :isv_mode, :corp_secret
  4 +
  5 + def initialize(corp_id)
  6 + @corp_id = corp_id
  7 + @isv_mode = false
  8 + @corp_secret = ''
  9 + end
  10 + end
  11 +end
0 \ No newline at end of file 12 \ No newline at end of file