Skip to content

Commit

Permalink
Update PokeApiClass.java
Browse files Browse the repository at this point in the history
  • Loading branch information
codeurzebs committed Dec 8, 2023
1 parent 2003f0e commit 1b98d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/ngcodex/PokeApiClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void main(String[] args) {
try {
HttpResponse<String> listResponse = client.send(listRequest, HttpResponse.BodyHandlers.ofString());
Map<String, Object> listResponseMap = JsonClass.parseJsonObject(listResponse.body());

if (listResponseMap.containsKey("results")) {
List<Map<String, Object>> pokemonList = (List<Map<String, Object>>) listResponseMap.get("results");
if (!pokemonList.isEmpty()) {
Map<String, Object> firstPokemon = pokemonList.get(0);
Expand Down

0 comments on commit 1b98d8d

Please sign in to comment.