Skip to content

Commit

Permalink
Reto mouredev#10 - Python
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordanaam committed Mar 7, 2023
1 parent 68048f3 commit 1478dea
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Retos/Reto #10 - LA API [Media]/python/mjordanaam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
/*
* Llamar a una API es una de las tareas más comunes en programación.
*
* Implementa una llamada HTTP a una API (la que tú quieras) y muestra su
* resultado a través de la terminal. Por ejemplo: Pokémon, Marvel...
*
* Aquí tienes un listado de posibles APIs:
* https://github.com/public-apis/public-apis
*/
"""

import requests
import json

URL = "https://api.vatcomply.com/currencies"

response = requests.get(URL)

currencies = json.loads(response.text)

print("List of currencies: \n")

for key, values in currencies.items():
print(key)
print("NAME: " + values['name'])
print("SYMBOL: " + values['symbol'] + "\n")

0 comments on commit 1478dea

Please sign in to comment.