Sha256: 81ed33a2f9b7f059a06de7b2fb11652ed6340a513e9ff34914a1d00c63dbb327
Contents?: true
Size: 977 Bytes
Versions: 14
Compression:
Stored size: 977 Bytes
Contents
require 'redis' require 'active_support/all' #require 'active_support/core_ext/object/blank' Dir["#{File.dirname(__FILE__)}/wework/*.rb"].each do |path| require path end require 'wework/api/base' require 'wework/api/agent' require 'wework/api/contact' module Wework API_ENDPOINT = 'https://qyapi.weixin.qq.com/cgi-bin/'.freeze AUTHORIZE_ENDPOINT = 'https://open.weixin.qq.com/connect/oauth2/authorize'.freeze ACCESS_TOKEN_PREFIX = 'WX_TOKEN'.freeze JSAPI_TOKEN_PREFIX = 'WX_JST'.freeze CONTACT_AGENT_ID = 'CONTACT'.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
14 entries across 14 versions & 1 rubygems