File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- This is used to convert the currency from one currency to another using the Amdoren Currency API
2
+ This is used to convert the currency using the Amdoren Currency API
3
3
"""
4
4
5
5
import requests
6
6
7
- # API_KEY = "" # <-- Put your API Key here
8
- API_KEY = "frSPXKMN93QNsmyQSjTcA4E26z6ryP"
7
+ API_KEY = "" # <-- Put your API Key here
9
8
URL_BASE = "https://www.amdoren.com/api/currency.php"
10
9
11
- # If you are using it on a website and free api key please add the below line in your website
10
+ # If you are using it on a website and free api key please add the below
11
+ # line in your website
12
12
# Powered by <a href="https://www.amdoren.com">Amdoren</a>
13
13
14
14
@@ -178,7 +178,8 @@ def convert_currency(
178
178
) -> str :
179
179
"""https://www.amdoren.com/currency-api/"""
180
180
res = requests .get (
181
- f"{ URL_BASE } ?api_key={ API_KEY } &from={ baseCurrency } &to={ targetCurrency } &amount={ amount } "
181
+ f"{ URL_BASE } ?api_key={ API_KEY } &from={ baseCurrency } &to={ targetCurrency } &\
182
+ amount={ amount } "
182
183
).json ()
183
184
if res ["error" ] == 0 :
184
185
return str (res ["amount" ])
You can’t perform that action at this time.
0 commit comments