{"id":18617017,"url":"https://github.com/robert-z/simple-pokemon-json-api","last_synced_at":"2025-06-22T03:37:32.441Z","repository":{"id":92069795,"uuid":"181667266","full_name":"robert-z/simple-pokemon-json-api","owner":"robert-z","description":"🐸 A simple Pokémon API used in APIs introduction lessons at Skylab Coders Academy.","archived":false,"fork":false,"pushed_at":"2019-04-22T08:29:38.000Z","size":26503,"stargazers_count":24,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T07:13:03.331Z","etag":null,"topics":["cheerio","es6","express","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robert-z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-16T10:26:04.000Z","updated_at":"2024-01-02T14:58:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"c495b0e6-32aa-41c8-a636-d9a149e269e0","html_url":"https://github.com/robert-z/simple-pokemon-json-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robert-z%2Fsimple-pokemon-json-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robert-z%2Fsimple-pokemon-json-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robert-z%2Fsimple-pokemon-json-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robert-z%2Fsimple-pokemon-json-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robert-z","download_url":"https://codeload.github.com/robert-z/simple-pokemon-json-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329487,"owners_count":21085541,"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":["cheerio","es6","express","javascript"],"created_at":"2024-11-07T03:38:42.746Z","updated_at":"2025-04-11T02:30:30.795Z","avatar_url":"https://github.com/robert-z.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Pokémon JSON API\n\n* [🤔 Project explanation](#-project-explanation)\n* [🚀 Environment setup](#-environment-setup)\n* [🤓 API Documentation](#-api-documentation)\n\n## 🤔 Project explanation\n\nThis simple Pokémon API has been created to be used in APIs introduction lessons in Skylab Coders Academy.\n\nWe need to have access to an API not connected to a online database, for this reason we scraped [pokémondb.net](https://pokemondb.net) website and saved the needed info of all Pokémons in a JSON file.\n\n## 🚀 Environment setup\n\n1. [Install Docker](https://www.docker.com/get-started) \n2. Clone this project: `git clone https://github.com/robert-z/simple-pokemon-json-api.git`\n3. Move to the project folder: `cd simple-json-pokeapi`\n4. Copy the default environment variables: `cp .env.dist .env`\n5. Add `api.pokemon.dev` domain to your local hosts: `echo \"127.0.0.1 api.pokemon.dev\"| sudo tee -a /etc/hosts \u003e /dev/null`\n6. Run `docker-compose build`\n7. Run `docker-compose up -d`\n\n## 🤓 API Documentation\n\n### Usage\n\nSend all data requests to:\n\n```\nhttp://api.pokemon.dev:8080/api\n```\n\n### Endpoints\n\n- `GET` /pokedex\n\n- `GET` /pokedex/:name\n\n- `GET` /pokedex/all\n\n- `GET` /search\n\n\n### Parameters\n\n#### `GET` /pokedex\n\n| Parameter     | Required      | Default Value  |\n| ------------- |:-------------:| --------------:|\n| page          | `No`          | 1              |\n| perPage       | `No`          | 20             |\n\n##### URL example\n```\nhttp://api.pokemon.dev:8080/api/pokedex?page=1\u0026perPage=10\n```\n\n##### Return example\n```json\n{\n    \"data\": [\n        {\n            \"num\": 1,\n            \"name\": \"Bulbasaur\",\n            \"image\": \"http://api.pokemon.dev/images/bulbasaur.jpg\"\n        },\n        ...\n    ],\n    \"page\": 1,\n    \"totalPages\": 81,\n    \"totalResults\": 809\n}\n```\n\n---\n\n#### `GET` /pokedex/:name\n\n| Parameter     | Required      | Default Value  |\n| ------------- |:-------------:| --------------:|\n| name          | `Yes`         | `\u003cempty\u003e`      |\n\n##### URL example\n```\nhttp://api.pokemon.dev:8080/api/pokedex/pikachu\n```\n\n##### Return example\n```json\n{\n    \"num\": 25,\n    \"name\": \"Pikachu\",\n    \"variations\": [\n        {\n            \"name\": \"Pikachu\",\n            \"description\": \"Pikachu is an Electric type Pokémon introduced in Generation 1. It is known as the Mouse Pokémon.\",\n            \"image\": \"http://api.pokemon.dev/images/pikachu.jpg\",\n            \"types\": [\n                \"Electric\"\n            ],\n            \"specie\": \"Mouse Pokémon\",\n            \"height\": 0.4,\n            \"weight\": 6,\n            \"abilities\": [\n                \"Static\",\n                \"Lightning Rod\"\n            ],\n            \"stats\": {\n                \"total\": 320,\n                \"hp\": 35,\n                \"attack\": 55,\n                \"defense\": 40,\n                \"speedAttack\": 50,\n                \"speedDefense\": 50,\n                \"speed\": 90\n            },\n            \"evolutions\": [\n                \"pichu\",\n                \"pikachu\",\n                \"raichu\"\n            ]\n        },\n        {\n            \"name\": \"Partner Pikachu\",\n            \"description\": \"Pikachu is an Electric type Pokémon introduced in Generation 1. It is known as the Mouse Pokémon.\",\n            \"image\": \"http://api.pokemon.dev/images/pikachu-lets-go.jpg\",\n            \"types\": [\n                \"Electric\"\n            ],\n            \"specie\": \"Mouse Pokémon\",\n            \"height\": 0.4,\n            \"weight\": 6,\n            \"abilities\": [],\n            \"stats\": {\n                \"total\": 430,\n                \"hp\": 45,\n                \"attack\": 80,\n                \"defense\": 50,\n                \"speedAttack\": 75,\n                \"speedDefense\": 60,\n                \"speed\": 120\n            },\n            \"evolutions\": [\n                \"pichu\",\n                \"pikachu\",\n                \"raichu\"\n            ]\n        }\n    ],\n    \"link\": \"https://pokemondb.net/pokedex/pikachu\"\n}\n```\n\n---\n\n#### `GET` /pokedex/all\n\n##### URL example\n```\nhttp://api.pokemon.dev:8080/api/pokedex/all\n```\n\n##### Return example\n```json\n{\n    \"data\": [\n        {\n            \"num\": 1,\n            \"name\": \"Bulbasaur\",\n            \"image\": \"http://api.pokemon.dev/images/bulbasaur.jpg\"\n        },\n        ...\n    ]\n}\n```\n\n---\n\n#### `GET` /search\n\n| Parameter     | Required      | Default Value  |\n| ------------- |:-------------:| --------------:|\n| query         | `Yes`         | `\u003cempty\u003e`      |\n| page          | `No`          | 1              |\n| perPage       | `No`          | 20             |\n\n##### URL example\n```\nhttp://api.pokemon.dev:8080/api/search?query=pik\u0026page=1\u0026perPage=10\n```\n\n##### Return example\n```json\n{\n    \"data\": [\n        {\n            \"num\": 25,\n            \"name\": \"Pikachu\",\n            \"image\": \"http://api.pokemon.dev/images/pikachu.jpg\"\n        },\n        ...\n    ],\n    \"page\": 1,\n    \"totalPages\": 1,\n    \"totalResults\": 6\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert-z%2Fsimple-pokemon-json-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobert-z%2Fsimple-pokemon-json-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert-z%2Fsimple-pokemon-json-api/lists"}