Module: Cryptoprocessing::Default
- Defined in:
- lib/cryptoprocessing/default.rb
Constant Summary collapse
- API_ENDPOINT =
Default API endpoint
'https://api.cryptoprocessing.io'.freeze
- API_NAMESPACE =
Default API namespace (suffix)
'/api'.freeze
- BLOCKCHAIN_TYPE =
'btc'.freeze
- USER_AGENT =
Default User Agent header string
"cryproprocessing/ruby/#{Cryptoprocessing::VERSION}".freeze
Class Method Summary collapse
-
.access_token ⇒ String
Default access token from ENV.
-
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT.
-
.api_namespace ⇒ String
Default API namespace from ENV or API_NAMESPACE.
- .blockchain_type ⇒ Object
-
.email ⇒ String
Default Cryptoprocessing email for Auth from ENV.
-
.netrc ⇒ Boolean
Default behavior for reading .netrc file.
-
.netrc_file ⇒ String
Default path for .netrc file.
-
.options ⇒ Hash
Configuration options.
-
.password ⇒ String
Default Cryptoprocessing password for Auth from ENV.
-
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT.
Class Method Details
.access_token ⇒ String
Default access token from ENV
26 27 28 |
# File 'lib/cryptoprocessing/default.rb', line 26 def access_token ENV['CRYPTOPROCESSING_ACCESS_TOKEN'] end |
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT
32 33 34 |
# File 'lib/cryptoprocessing/default.rb', line 32 def api_endpoint ENV['CRYPTOPROCESSING_API_ENDPOINT'] || API_ENDPOINT end |
.api_namespace ⇒ String
Default API namespace from ENV or API_NAMESPACE
38 39 40 |
# File 'lib/cryptoprocessing/default.rb', line 38 def api_namespace ENV['CRYPTOPROCESSING_API_NAMESPACE'] || API_NAMESPACE end |
.blockchain_type ⇒ Object
42 43 44 |
# File 'lib/cryptoprocessing/default.rb', line 42 def blockchain_type ENV['CRYPTOPROCESSING_BLOCKCHAIN_TYPE'] || BLOCKCHAIN_TYPE end |
.email ⇒ String
Default Cryptoprocessing email for Auth from ENV
48 49 50 |
# File 'lib/cryptoprocessing/default.rb', line 48 def email ENV['CRYPTOPROCESSING_EMAIL'] end |
.netrc ⇒ Boolean
Default behavior for reading .netrc file
66 67 68 |
# File 'lib/cryptoprocessing/default.rb', line 66 def netrc ENV['CRYPTOPROCESSING_NETRC'] || false end |
.netrc_file ⇒ String
Default path for .netrc file
72 73 74 |
# File 'lib/cryptoprocessing/default.rb', line 72 def netrc_file ENV['CRYPTOPROCESSING_NETRC_FILE'] || File.join(ENV['HOME'].to_s, '.netrc') end |
.options ⇒ Hash
Configuration options
20 21 22 |
# File 'lib/cryptoprocessing/default.rb', line 20 def Hash[Cryptoprocessing::Configurable.keys.map{|key| [key, send(key)]}] end |
.password ⇒ String
Default Cryptoprocessing password for Auth from ENV
54 55 56 |
# File 'lib/cryptoprocessing/default.rb', line 54 def password ENV['CRYPTOPROCESSING_PASSWORD'] end |
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT
60 61 62 |
# File 'lib/cryptoprocessing/default.rb', line 60 def user_agent ENV['CRYPTOPROCESSING_USER_AGENT'] || USER_AGENT end |