Class: Kucoin::Configuration
- Inherits:
-
Object
- Object
- Kucoin::Configuration
- Defined in:
- lib/kucoin/configuration.rb
Instance Attribute Summary collapse
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#faraday ⇒ Object
Returns the value of attribute faraday.
-
#key ⇒ Object
Returns the value of attribute key.
-
#secret ⇒ Object
Returns the value of attribute secret.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #verbose_faraday? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kucoin/configuration.rb', line 5 def initialize self.api_url = "https://api.kucoin.com" self.api_version = 1 self.key = nil self.secret = nil self.faraday = { adapter: :net_http, user_agent: 'KuCoin Ruby', verbose: false } end |
Instance Attribute Details
#api_url ⇒ Object
Returns the value of attribute api_url.
3 4 5 |
# File 'lib/kucoin/configuration.rb', line 3 def api_url @api_url end |
#api_version ⇒ Object
Returns the value of attribute api_version.
3 4 5 |
# File 'lib/kucoin/configuration.rb', line 3 def api_version @api_version end |
#faraday ⇒ Object
Returns the value of attribute faraday.
3 4 5 |
# File 'lib/kucoin/configuration.rb', line 3 def faraday @faraday end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/kucoin/configuration.rb', line 3 def key @key end |
#secret ⇒ Object
Returns the value of attribute secret.
3 4 5 |
# File 'lib/kucoin/configuration.rb', line 3 def secret @secret end |
Instance Method Details
#verbose_faraday? ⇒ Boolean
19 20 21 |
# File 'lib/kucoin/configuration.rb', line 19 def verbose_faraday? self.faraday.fetch(:verbose, false) end |