Sha256: 12e0b479d8182fea49b70e5d6a6f5700529cf042b24a5231f5c2ca0fd3e53c69

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

require "dingtalk/version"
require "dingtalk/api/Base"

# Dingtalk top namespace
module Dingtalk
  class Error < StandardError; end
  class RequestException < RuntimeError; end

  class << self
    attr_accessor :configuration

    def configuration
      @configuration ||= Dingtalk::Configuration.new
    end

    def configure
      yield(configuration)
    end
  end
  
  class Configuration
    attr_accessor :oapi_host, :corpid, :appkey, :appsecret

    def initialize
      @oapi_host = "https://oapi.dingtalk.com"
      @corpid = ""
      @appkey = ""
      @appsecret = ""
    end
  end

  class Client
    
  end

  P_APPKEY = "app_key".freeze
  P_API = "method".freeze
  P_ACCESS_TOKEN = "access_token".freeze
  P_VERSION = "v".freeze
  P_FORMAT = "format".freeze
  P_TIMESTAMP = "timestamp".freeze
  P_SIGN = "sign".freeze
  P_SIGN_METHOD = "sign_method".freeze
  P_PARTNER_ID = "partner_id".freeze

  SYSTEM_GENERATE_VERSION = "taobao-sdk-ruby-dynamicVersionNo".freeze

  P_CODE = 'errcode'.freeze
  P_MSG = 'errmsg'.freeze

  module Api
    autoload :OapiGettokenRequest, 'dingtalk/api/OapiGettokenRequest'
    autoload :OapiSnsGetuserinfoBycodeRequest, 'dingtalk/api/OapiSnsGetuserinfoBycodeRequest'
    autoload :OapiUserGetUseridByUnionidRequest, 'dingtalk/api/OapiUserGetUseridByUnionidRequest'
    autoload :OapiUserGetRequest, 'dingtalk/api/OapiUserGetRequest'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dingtalk-ruby-0.1.2 lib/dingtalk.rb