Class: Harmony::Api::Configuration
- Inherits:
-
Object
- Object
- Harmony::Api::Configuration
- Defined in:
- lib/harmony/api/configuration.rb
Instance Attribute Summary collapse
-
#faraday ⇒ Object
Returns the value of attribute faraday.
-
#networks ⇒ Object
Returns the value of attribute networks.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/harmony/api/configuration.rb', line 8 def initialize self.networks = { mainnet: { shards: 4, url: 'https://api.s%d.t.hmny.io' }, testnet: { shards: 3, url: 'https://api.s%d.lrtn.hmny.io' }, tnet: { shards: 2, url: 'https://api.s%d.tn.hmny.io' }, os: { shards: 4, url: 'https://api.s%d.os.hmny.io' }, ps: { shards: 2, url: 'https://api.s%d.ps.hmny.io' }, stn: { shards: 2, url: 'https://api.s%d.stn.hmny.io' }, pga: { shards: 2, url: 'https://api.s%d.pga.hmny.io' } } self.faraday = { adapter: :net_http, timeout: 120, open_timeout: 60 } self.verbose = false end |
Instance Attribute Details
#faraday ⇒ Object
Returns the value of attribute faraday.
6 7 8 |
# File 'lib/harmony/api/configuration.rb', line 6 def faraday @faraday end |
#networks ⇒ Object
Returns the value of attribute networks.
6 7 8 |
# File 'lib/harmony/api/configuration.rb', line 6 def networks @networks end |
#verbose ⇒ Object
Returns the value of attribute verbose.
6 7 8 |
# File 'lib/harmony/api/configuration.rb', line 6 def verbose @verbose end |