mirror of
https://github.com/fawazahmed0/exchange-api.git
synced 2025-06-30 10:33:50 +00:00
685 B
685 B
Migration Guide
-
Change the URL from
https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@{apiVersion}/{date}/{endpoint}
to
https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@{date}/{apiVersion}/{endpoint}
-
change
date
fromYYYY-MM-DD
toYYYY.M.D
. Eg:2024-03-02
becomes2024.3.2
-
There is no
/currencies/{currencyCode}/{currencyCode}
endpoint in this new API, so please only use/currencies/{currencyCode}
endpoint. See example given below.
json = fetchJSON(`/currencies/{fromCurrency}/{toCurrency}`)
rate = json[toCurrency]
becomes
json = fetchJSON(`/currencies/{fromCurrency}`)
rate = json[fromCurrency][toCurrency]