{"id":19419794,"url":"https://github.com/iamgio/pokedex-java-api","last_synced_at":"2025-04-24T14:31:57.865Z","repository":{"id":37790396,"uuid":"160564582","full_name":"iamgio/pokedex-java-api","owner":"iamgio","description":":snake: Pokémon API for Java, 1st to 7th generation","archived":false,"fork":false,"pushed_at":"2022-06-16T20:54:21.000Z","size":94,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T06:22:03.414Z","etag":null,"topics":["api","pokedex","pokedex-api","pokemon","pokemon-java-api"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamgio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-05T18:57:44.000Z","updated_at":"2025-01-28T06:48:00.000Z","dependencies_parsed_at":"2022-06-23T20:54:11.097Z","dependency_job_id":null,"html_url":"https://github.com/iamgio/pokedex-java-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgio%2Fpokedex-java-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgio%2Fpokedex-java-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgio%2Fpokedex-java-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgio%2Fpokedex-java-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamgio","download_url":"https://codeload.github.com/iamgio/pokedex-java-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643473,"owners_count":21464182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","pokedex","pokedex-api","pokemon","pokemon-java-api"],"created_at":"2024-11-10T13:19:09.088Z","updated_at":"2025-04-24T14:31:57.565Z","avatar_url":"https://github.com/iamgio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/eT8UJl0.png\"\u003e\n\u003c/p\u003e\n\n[![Codacy](https://api.codacy.com/project/badge/Grade/087ddd3689bf4ad08d383f52a9936708)](https://www.codacy.com/app/iAmGio/pokedex-java-api?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=iAmGio/pokedex-java-api\u0026amp;utm_campaign=Badge_Grade) [![CodeFactor](https://www.codefactor.io/repository/github/iamgio/pokedex-java-api/badge)](https://www.codefactor.io/repository/github/iamgio/pokedex-java-api)\n\n# Pokédex Java API\n_pokedex-java-api_ is the first wrapper for [pokeapi.co](https://pokeapi.co) written in pure Java.\n   \n# Why should I use PDJ API?\n- [x] Fully documented  \n- [x] Everything is treated as an object  \n- [x] Mantainable and readable code  \n\n# Maven\n\n```xml\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003ejitpack.io\u003c/id\u003e\n            \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.github.iAmGio\u003c/groupId\u003e\n            \u003cartifactId\u003epokedex-java-api\u003c/artifactId\u003e\n            \u003cversion\u003eVERSION\u003c/version\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n```\n\n# Gradle\n\n```groovy\n  repositories {\n\tmaven {\n\t  url 'https://jitpack.io' \n\t}\n  }\n  \n  dependencies {\n    implementation 'com.github.iAmGio:pokedex-java-api:VERSION'\n  }\n```\n\n# Manual / JAR\n\nJAR files can be found in the [releases](https://github.com/iAmGio/pokedex-java-api/releases) tab.\n\n# Getting started\n\nTo get started, let's try to get the types of [Bulbasaur](https://www.pokemon.com/us/pokedex/bulbasaur):\n\n```java\npublic class Main {\n    public static void main(String[] args) {\n        Pokemon bulbasaur = Pokemon.fromName(\"bulbasaur\");\n        Pair\u003cPokemonType, PokemonType\u003e types = bulbasaur.getTypes();\n        System.out.println(types.getFirst());\n        System.out.println(types.getSecond());\n    }\n}\n```\n\nThis will output:\n```\nGRASS\nPOISON\n```\n\nEvery component of the API (such as Pokémons, abilities, etc) can be instantiated by using two static methods: `fromName`, which takes the name as a string, and `fromId`, which takes the identifier as a number.\n\n# Localized strings\n\nAn interesting part of this library is the one which collects strings from various languages, contained inside the [lang](https://github.com/iAmGio/pokedex-java-api/tree/master/src/main/java/eu/iamgio/pokedex/lang) package.   \nEvery localized string is composed by two fields: `name` (String) and `language` (enum Language), and groups of them are stored inside specific lists, such as `LocalizedNames` or `FlavorList` (both extend `LocalizedNameList`). They have a `get(Language)` method which returns the string in the selected language.   \n\nThe particular one is `FlavorList`: a flavor is a localized string assigned within a version (or a version group) of the official game: having a flavor list, you will be able to do something like this:\n```java\nFlavorList\u003cVersion\u003e flavors = ...;\nString englishStringFromPearl = flavors.filterVersion(Version.PEARL).get(Language.ENGLISH);\n```\n\n_Credits to this project and to pokeapi.co are appreciated._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamgio%2Fpokedex-java-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamgio%2Fpokedex-java-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamgio%2Fpokedex-java-api/lists"}