Sha256: 1f1369264e1337cb29192261136f2d6fa6c0ffb8d380ab63b2220be15629aa75
Contents?: true
Size: 922 Bytes
Versions: 2
Compression:
Stored size: 922 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 = 'TOKEN'.freeze JSAPI_TOKEN_PREFIX = '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 ResponseError < StandardError attr_reader :error_code def initialize(errcode, errmsg='') @error_code = errcode super "(#{error_code}) #{errmsg}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wework-0.1.4 | lib/wework.rb |
wework-0.1.3 | lib/wework.rb |