Skip to content

Commit

Permalink
Merge pull request #2512 from sopel-irc/currency-api-changes
Browse files Browse the repository at this point in the history
currency: replace `exchangerate.host` -> `open.er-api.com`
  • Loading branch information
dgw authored Oct 11, 2023
2 parents f2e1366 + d4686ff commit 4c7b507
Show file tree
Hide file tree
Showing 3 changed files with 661 additions and 115 deletions.
4 changes: 2 additions & 2 deletions sopel/modules/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

PLUGIN_OUTPUT_PREFIX = '[currency] '
FIAT_PROVIDERS = {
'exchangerate.host': 'https://api.exchangerate.host/latest?base=EUR',
'open.er-api.com': 'https://open.er-api.com/v6/latest/EUR',
'fixer.io': '//data.fixer.io/api/latest?base=EUR&access_key={}',
}
CRYPTO_URL = 'https://api.coingecko.com/api/v3/exchange_rates'
Expand All @@ -43,7 +43,7 @@ class CurrencySection(types.StaticSection):
fiat_provider = types.ChoiceAttribute(
'fiat_provider',
list(FIAT_PROVIDERS.keys()),
default='exchangerate.host',
default='open.er-api.com',
)
"""Which data provider to use (some of which require no API key)"""
fixer_io_key = types.ValidatedAttribute('fixer_io_key', default=None)
Expand Down
Loading

0 comments on commit 4c7b507

Please sign in to comment.