Sha256: db9ec82c3a6222e76bca8fcbaeaff21826555b6d9c077fd843e64ef3353026aa
Contents?: true
Size: 1.23 KB
Versions: 8
Compression:
Stored size: 1.23 KB
Contents
require 'redis' require 'active_support/all' #require 'active_support/core_ext/object/blank' LIB_PATH = "#{File.dirname(__FILE__)}/wework" Dir["#{LIB_PATH}/api/methods/*.rb", "#{LIB_PATH}/token/*.rb"].each { |path| require path } require 'wework/version' require 'wework/cipher' require 'wework/config' require 'wework/api/base' require 'wework/api/agent' require 'wework/api/contact' require 'wework/api/suite' require 'wework/api/corp' require 'wework/api/provider' module Wework API_ENDPOINT = 'https://qyapi.weixin.qq.com/cgi-bin/'.freeze AUTHORIZE_ENDPOINT = 'https://open.weixin.qq.com/connect/oauth2/authorize'.freeze SSO_AUTHORIZE_ENDPOINT = 'https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect'.freeze APP_AUTHORIZE_ENDPOINT = 'https://open.work.weixin.qq.com/3rdapp/install'.freeze HTTP_OK_STATUS = [200, 201].freeze SUCCESS_CODE = 0 # Exceptions class RedisNotConfigException < RuntimeError; end class AccessTokenExpiredError < RuntimeError; end class ResultErrorException < RuntimeError; end class ResponseError < StandardError attr_reader :error_code def initialize(errcode, errmsg='') @error_code = errcode super "(#{error_code}) #{errmsg}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems