class
Money::Currency::RateProvider::CoinGecko
Overview
CoinGecko currency rate provider.
NOTE Supports only BTC-based conversions.
Included Modules
Defined in:
money/currency/rate_provider/providers/coingecko.crConstant Summary
-
Log =
::Log.for(self)
Constructors
-
.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
CoinGecko currency rate provider.
-
.new(pull : JSON::PullParser)
CoinGecko currency rate provider.
- .new(*, host : Nil | URI = nil)
Class Method Summary
-
.key : String
Returns the class key.
Instance Method Summary
- #base_currency_code : String
-
#host : URI
Returns the host URI used by the HTTP
#clientinstance.
Instance methods inherited from module Money::Currency::RateProvider::OneToMany
base_currency_code : String
base_currency_code,
base_currency_codes : Array(String)
base_currency_codes,
exchange_rate?(base : Currency, target : Currency) : Currency::Rate | Nil
exchange_rate?,
target_currency_codes : Array(String)
target_currency_codes
Instance methods inherited from module Money::Currency::RateProvider::HTTP
host : URI
host
Instance methods inherited from class Money::Currency::RateProvider
base_currency_codes : Array(String)
base_currency_codes,
exchange_rate?(base : Currency, target : Currency) : Rate | Nil
exchange_rate?,
supports_currency_pair?(base : Currency, target : Currency) : Bool
supports_currency_pair?,
target_currency_codes : Array(String)
target_currency_codes
Constructor methods inherited from class Money::Currency::RateProvider
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) new
Class methods inherited from class Money::Currency::RateProvider
find(name : String | Symbol) : Money::Currency::RateProvider.class
find,
find?(name : String | Symbol) : Money::Currency::RateProvider.class | Nil
find?,
registry
registry
Constructor Detail
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
#
CoinGecko currency rate provider.
NOTE Supports only BTC-based conversions.
def self.new(pull : JSON::PullParser)
#
CoinGecko currency rate provider.
NOTE Supports only BTC-based conversions.
Class Method Detail
Instance Method Detail
def host : URI
#
Description copied from module Money::Currency::RateProvider::HTTP
Returns the host URI used by the HTTP #client instance.