We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Explore

After a user uses the map commands to find a location area, we want them to be able to see a list of all the Pokémon located there.

Assignment

Add an explore command. It takes the name of a location area as an argument.

Run and submit the CLI tests.

Tips

  • Use the same PokeAPI location-area endpoint, but this time you'll need to pass the name of the location area being explored. By adding a name or id, the API will return a lot more information about the location area.
  • Feel free to use tools like JSON lint and JSON to Go to help you parse the response.
  • Parse the Pokemon's names from the response and display them to the user.
  • Make sure to use the caching layer again! Re-exploring an area should be blazingly fast.
  • You'll need to alter the function signature of all your commands to allow them to allow parameters. E.g. explore <area_name>

Example usage:

Pokedex > explore pastoria-city-area
Exploring pastoria-city-area...
Found Pokemon:
 - tentacool
 - tentacruel
 - magikarp
 - gyarados
 - remoraid
 - octillery
 - wingull
 - pelipper
 - shellos
 - gastrodon
Pokedex >