Module: Wework
- Defined in:
- lib/wework.rb,
lib/wework/cipher.rb,
lib/wework/config.rb,
lib/wework/engine.rb,
lib/wework/request.rb,
lib/wework/version.rb,
lib/wework/api/base.rb,
lib/wework/api/agent.rb,
lib/wework/api/contact.rb,
lib/wework/token/store.rb,
lib/wework/js_ticket/store.rb,
lib/wework/token/redis_store.rb,
lib/wework/js_ticket/redis_store.rb
Defined Under Namespace
Modules: Api, Cipher, JsTicket, Token
Classes: AccessTokenExpiredError, Config, Engine, RedisNotConfigException, Request, ResponseError, Result
Constant Summary
collapse
- 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
- VERSION =
'0.1.7'.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
4
5
6
|
# File 'lib/wework/config.rb', line 4
def config
@config
end
|
Class Method Details
5
6
7
|
# File 'lib/wework/config.rb', line 5
def configure
yield config
end
|
.http_timeout_options ⇒ Object
17
18
19
|
# File 'lib/wework/config.rb', line 17
def http_timeout_options
config.http_timeout_options || {write: 5, connect: 5, read: 5}
end
|
.redis ⇒ Object
13
14
15
|
# File 'lib/wework/config.rb', line 13
def redis
config.redis
end
|