CurrencyConverter
Coverts source currency to target currency.
Example:
iex> CurrencyConverter.convert!("USD", "JPY")
108.78504 # 1 USD =~ 108.78504 JPYInstallation
Add to
mix.exsdef deps do [ {:currency_converter, "~> 0.1.0"} ] endIf needed, get an API key for Currency Converty API (there is a free tier!)
Add API key to config
use Mix.Config config :currency_converter, api_key: <api_key>
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/currency_converter.