- Desarrollo Web / Grupo 255: Workspace 1 / Semana 11 / Carpeta.11.1.1 / Taller: APIs (Individual) / JaP 2023
Note
Welcome to the Pokedex Web App – your ultimate Pokemon companion! 🌟
Dive into the fascinating world of Pokemon with a Pokedex search tool! This simple and sleek web page lets you explore and learn about your favorite Pokemon by entering their names. The design is clean, featuring a charming title, "Buscador de Pokemons" (Pokemon Searcher), made for trainers of all ages.
Important
Key Features:
- Search Functionality: Enter the name of your desired Pokemon in the search bar (e.g., ditto, bulbasaur, pikachu), and click "Buscar" (Search).
- Clear Button: Accidentally made a typo or want to search for a new Pokemon? Hit "Borrar" (Clear) to reset and start fresh.
- Informative Display: The fetched data from the PokeAPI is neatly presented below the search bar, showing the Pokemon's name, an image, height, and weight.
Tip
Technical Insight:
The magic happens with the ApiCall()
function! Using the Fetch API, this function sends a request to the PokeAPI, fetching details about the entered Pokemon. The fetched data is then dynamically displayed in the HTML using JavaScript. If an error occurs, such as an invalid Pokemon name or an empty search field, the app gracefully handles it, providing helpful error messages to guide the user.
In addition, the borrarContenido()
function ensures a clean slate by clearing the displayed content when the "Borrar" button is clicked.
Feel free to explore the Pokemon world at your fingertips!