This Go project demonstrates how to make a GET request to the PokeAPI to retrieve data about various aspects of Pokemon.
The project fetches data from the PokeAPI, specifically details about a specified Pokémon. It performs an HTTP GET request to the PokeAPI, parses the JSON response, and prints the Pokémon's name, order, and types.
- Go 1.16 or higher
- Internet connection (to fetch data from the PokeAPI)
-
Clone the repository:
git clone https://github.com/conwaycj/pokedex_go.git cd pokedex_go
-
Initialize Go modules (if not already initialized):
go mod init pokeapi-go-client
-
Install dependencies (if any):
go mod tidy
-
Run the application:
go build && ./pokedex_go.exe
-
See commands:
Pokedex > help
-
map
command example:Pokedex > map
The first-time output for this command will be:
1: canalave-city 2: eterna-city 3: pastoria-city 4: sunyshore-city 5: sinnoh-pokemon-league