Class: Alidayu::Configuration
- Inherits:
-
Object
- Object
- Alidayu::Configuration
- Defined in:
- lib/alidayu/configuration.rb
Instance Method Summary collapse
- #app_key ⇒ Object
- #app_key=(app_key) ⇒ Object
- #app_secret ⇒ Object
- #app_secret=(app_secret) ⇒ Object
-
#server ⇒ Object
API请求地址分为正式(http/https)和沙箱(http/https)共四个地址 正式-http: gw.api.taobao.com/router/rest 正式-https: eco.taobao.com/router/rest 沙箱-http: gw.api.tbsandbox.com/router/rest 沙箱-https: gw.api.tbsandbox.com/router/rest.
- #server=(server) ⇒ Object
- #sign_name ⇒ Object
- #sign_name=(sign_name) ⇒ Object
Instance Method Details
#app_key ⇒ Object
16 17 18 |
# File 'lib/alidayu/configuration.rb', line 16 def app_key @app_key ||= 'your_app_key' end |
#app_key=(app_key) ⇒ Object
20 21 22 |
# File 'lib/alidayu/configuration.rb', line 20 def app_key=(app_key) @app_key = app_key end |
#app_secret ⇒ Object
24 25 26 |
# File 'lib/alidayu/configuration.rb', line 24 def app_secret @app_secret ||= 'your_app_secret' end |
#app_secret=(app_secret) ⇒ Object
28 29 30 |
# File 'lib/alidayu/configuration.rb', line 28 def app_secret=(app_secret) @app_secret = app_secret end |
#server ⇒ Object
API请求地址分为正式(http/https)和沙箱(http/https)共四个地址正式-http: gw.api.taobao.com/router/rest
正式-https: eco.taobao.com/router/rest 沙箱-http: gw.api.tbsandbox.com/router/rest 沙箱-https: gw.api.tbsandbox.com/router/rest
8 9 10 |
# File 'lib/alidayu/configuration.rb', line 8 def server @server ||= 'https://eco.taobao.com/router/rest' end |
#server=(server) ⇒ Object
12 13 14 |
# File 'lib/alidayu/configuration.rb', line 12 def server=(server) @server = server end |
#sign_name ⇒ Object
32 33 34 |
# File 'lib/alidayu/configuration.rb', line 32 def sign_name @sign_name ||= 'sign_name' end |
#sign_name=(sign_name) ⇒ Object
36 37 38 |
# File 'lib/alidayu/configuration.rb', line 36 def sign_name=(sign_name) @sign_name = sign_name end |