Module: Kuaipan::Config
- Extended by:
- Forwardable
- Defined in:
- lib/kuaipan/config.rb
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/kuaipan/config.rb', line 7 def @options end |
Class Method Details
.options_base ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/kuaipan/config.rb', line 27 def {oauth_signature_method: Config.[:oauth_signature_method], oauth_version: Config.[:oauth_version], oauth_consumer_key: Config.[:oauth_consumer_key], rtoken_path: Config.[:rtoken_path], atoken_path: Config.[:atoken_path], site: Config.[:site]} end |
.opts(consumer_key, consumer_secret, p = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/kuaipan/config.rb', line 9 def opts(consumer_key, consumer_secret, p={}) Config. = {oauth_consumer_secret: consumer_secret, oauth_consumer_key: consumer_key, root: 'app_folder', oauth_signature_method: 'HMAC-SHA1', oauth_version: '1.0', site: 'openapi.kuaipan.cn', thum_doc_site: 'conv.kuaipan.cn', up_down_file_stie: 'api-content.dfs.kuaipan.cn', rtoken_path: '/open/requestToken', atoken_path: '/open/accessToken', authorize_url: 'https://www.kuaipan.cn/api.php?ac=open&op=authorise', types: %w(pdf doc wps csv prn xls et ppt dps txt rtf), views: %w(normal android iPad iphone) }.merge(p) end |