diff --git a/docs/classes/index.ForexClient.html b/docs/classes/index.ForexClient.html index 0a36e3d..62999aa 100644 --- a/docs/classes/index.ForexClient.html +++ b/docs/classes/index.ForexClient.html @@ -1,163 +1,163 @@
A client to interact with the Forex API for fetching currency rates and conversion data
+Creates a new instance of ForexClient
Optional
options: ForexClientOptions = {}The options for configuring the client
-Fetches the list of available currencies
+Fetches the list of available currencies
Optional
date: Date | "latest" = 'latest'The date for fetching currencies, or "latest"
for the most recent
Optional
options: RequestInit = {}Additional request options
A list of available currencies
Fetches the exchange rates for a specific currency
+Fetches the exchange rates for a specific currency
Optional
code: string = ...The currency code or locale code to get rates for
Optional
date: Date | "latest" = 'latest'The date for the rates, or 'latest'
for the most recent
Optional
options: RequestInit = {}Additional request options
@@ -184,7 +184,7 @@Fetches the exchange rate between two currencies
+Fetches the exchange rate between two currencies
Optional
baseCode: string = ...The base currency code or locale code
Optional
destCode: stringThe destination currency code or locale code
Optional
date: Date | "latest" = 'latest'Converts an amount from one currency to another
+Converts an amount from one currency to another
Optional
baseCode: string = ...The base currency code or locale code
Optional
destCode: stringThe destination currency code or locale code
Optional
amount: string | number = 0The amount to convert
@@ -218,7 +218,7 @@Protected
getProtected
_fetchProtected
getProtected
_fetchProtected
_fetch💱 一个 JavaScript 外汇库,通过 fawazahmed0
的 API。
exchange-api - 如果没有这个,这个包就不会存在。
欢迎通过 Pull Requests 或 Issues 来贡献你的想法和代码。
本项目采用 MIT 许可证。详情请见 LICENSE 文件。
-💱 A JavaScript foreign exchange library via fawazahmed0
's API.
exchange-api - This package would not exist without this.
Contributions via Pull Requests or Issues are welcome.
This project is licensed under the MIT License. See the LICENSE file for details.
-Const
https://github.com/fawazahmed0/exchange-api
+Const
https://github.com/fawazahmed0/exchange-api
export const BASE_URL =
'https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api';
-Const
https://github.com/fawazahmed0/exchange-api
+Const
Const
https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one)
+Const
https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one)
export const LOCALE_CURRENCY = {
AD: 'EUR',
AE: 'AED',
AF: 'AFN',
AG: 'XCD',
AI: 'XCD',
AL: 'ALL',
AM: 'AMD',
AO: 'AOA',
AR: 'ARS',
AS: 'USD',
AT: 'EUR',
AU: 'AUD',
AW: 'AWG',
AX: 'EUR',
AZ: 'AZN',
BA: 'BAM',
BB: 'BBD',
BD: 'BDT',
BE: 'EUR',
BF: 'XOF',
BG: 'BGN',
BH: 'BHD',
BI: 'BIF',
BJ: 'XOF',
BL: 'EUR',
BM: 'BMD',
BN: 'BND',
BO: 'BOB',
BQ: 'USD',
BR: 'BRL',
BS: 'BSD',
BT: 'BTN',
BV: 'NOK',
BW: 'BWP',
BY: 'BYN',
BZ: 'BZD',
CA: 'CAD',
CC: 'AUD',
CD: 'CDF',
CF: 'XAF',
CG: 'XAF',
CH: 'CHF',
CI: 'XOF',
CK: 'NZD',
CL: 'CLP',
CM: 'XAF',
CN: 'CNY',
CO: 'COP',
CR: 'CRC',
CU: 'CUP',
CV: 'CVE',
CW: 'ANG',
CX: 'AUD',
CY: 'EUR',
CZ: 'CZK',
DE: 'EUR',
DJ: 'DJF',
DK: 'DKK',
DM: 'XCD',
DO: 'DOP',
DZ: 'DZD',
EC: 'USD',
EE: 'EUR',
EG: 'EGP',
EH: 'MAD',
ER: 'ERN',
ES: 'EUR',
ET: 'ETB',
FI: 'EUR',
FJ: 'FJD',
FK: 'FKP',
FM: 'USD',
FO: 'DKK',
FR: 'EUR',
GA: 'XAF',
GB: 'GBP',
GD: 'XCD',
GE: 'GEL',
GF: 'EUR',
GG: 'GBP',
GH: 'GHS',
GI: 'GIP',
GL: 'DKK',
GM: 'GMD',
GN: 'GNF',
GP: 'EUR',
GQ: 'XAF',
GR: 'EUR',
GS: 'GBP',
GT: 'GTQ',
GU: 'USD',
GW: 'XOF',
GY: 'GYD',
HK: 'HKD',
HM: 'AUD',
HN: 'HNL',
HR: 'EUR',
HT: 'HTG',
HU: 'HUF',
ID: 'IDR',
IE: 'EUR',
IL: 'ILS',
IM: 'GBP',
IN: 'INR',
IO: 'USD',
IQ: 'IQD',
IR: 'IRR',
IS: 'ISK',
IT: 'EUR',
JE: 'GBP',
JM: 'JMD',
JO: 'JOD',
JP: 'JPY',
KE: 'KES',
KG: 'KGS',
KH: 'KHR',
KI: 'AUD',
KM: 'KMF',
KN: 'XCD',
KP: 'KPW',
KR: 'KRW',
KW: 'KWD',
KY: 'KYD',
KZ: 'KZT',
LA: 'LAK',
LB: 'LBP',
LC: 'XCD',
LI: 'CHF',
LK: 'LKR',
LR: 'LRD',
LS: 'LSL',
LT: 'EUR',
LU: 'EUR',
LV: 'EUR',
LY: 'LYD',
MA: 'MAD',
MC: 'EUR',
MD: 'MDL',
ME: 'EUR',
MF: 'EUR',
MG: 'MGA',
MH: 'USD',
MK: 'MKD',
ML: 'XOF',
MM: 'MMK',
MN: 'MNT',
MO: 'MOP',
MP: 'USD',
MQ: 'EUR',
MR: 'MRO',
MS: 'XCD',
MT: 'EUR',
MU: 'MUR',
MV: 'MVR',
MW: 'MWK',
MX: 'MXN',
MY: 'MYR',
MZ: 'MZN',
NA: 'NAD',
NC: 'XPF',
NE: 'XOF',
NF: 'AUD',
NG: 'NGN',
NI: 'NIO',
NL: 'EUR',
NO: 'NOK',
NP: 'NPR',
NR: 'AUD',
NU: 'NZD',
NZ: 'NZD',
OM: 'OMR',
PA: 'PAB',
PE: 'PEN',
PF: 'XPF',
PG: 'PGK',
PH: 'PHP',
PK: 'PKR',
PL: 'PLN',
PM: 'EUR',
PN: 'NZD',
PR: 'USD',
PS: 'ILS',
PT: 'EUR',
PW: 'USD',
PY: 'PYG',
QA: 'QAR',
RE: 'EUR',
RO: 'RON',
RS: 'RSD',
RU: 'RUB',
RW: 'RWF',
SA: 'SAR',
SB: 'SBD',
SC: 'SCR',
SD: 'SDG',
SE: 'SEK',
SG: 'SGD',
SH: 'SHP',
SI: 'EUR',
SJ: 'NOK',
SK: 'EUR',
SL: 'SLL',
SM: 'EUR',
SN: 'XOF',
SO: 'SOS',
SR: 'SRD',
ST: 'STD',
SV: 'SVC',
SX: 'ANG',
SY: 'SYP',
SZ: 'SZL',
TC: 'USD',
TD: 'XAF',
TF: 'EUR',
TG: 'XOF',
TH: 'THB',
TJ: 'TJS',
TK: 'NZD',
TL: 'USD',
TM: 'TMT',
TN: 'TND',
TO: 'TOP',
TR: 'TRY',
TT: 'TTD',
TV: 'AUD',
TW: 'TWD',
TZ: 'TZS',
UA: 'UAH',
UG: 'UGX',
UM: 'USD',
US: 'USD',
UY: 'UYU',
UZ: 'UZS',
VA: 'EUR',
VC: 'XCD',
VE: 'VEF',
VG: 'USD',
VI: 'USD',
VN: 'VND',
VU: 'VUV',
WF: 'XPF',
WS: 'WST',
YE: 'YER',
YT: 'EUR',
ZA: 'ZAR',
ZM: 'ZMW',
ZW: 'ZWL',
};
-Const
https://en.wikipedia.org/wiki/ISO_4217#Non-standard_codes
+Const
https://en.wikipedia.org/wiki/ISO_4217#Non-standard_codes
export const NON_STANDARD_CODES = {
BDS: 'BBD',
CNT: 'TWD',
NIS: 'ILS',
NTD: 'TWD',
STG: 'GBP',
RMB: 'CNY',
};
-
A client to interact with the Forex API for fetching currency rates and conversion data
-