Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Update /pokemon endpoint to include a Pokémon's type #1

Open
sbmsr opened this issue Dec 6, 2022 · 0 comments
Open

[Feature] Update /pokemon endpoint to include a Pokémon's type #1

sbmsr opened this issue Dec 6, 2022 · 0 comments

Comments

@sbmsr
Copy link
Member

sbmsr commented Dec 6, 2022

What you need to do

Our API needs to expose a Pokemon's type. As it currently stands, a request to http://localhost:8000/pokemon/ returns:

[
	{
		"id": 1,
		"name_english": "Bulbasaur",
		"name_japanese": "フシギダネ",
		"name_chinese": "妙蛙种子",
		"name_french": "Bulbizarre",
		"hp": 45,
		"attack": 49,
		"defense": 49,
		"special_attack": 65,
		"special_defense": 65,
		"speed": 45
	},
	{
		"id": 2,
...

Expected behavior

  1. a request to http://localhost:8000/pokemon/ should return HTTP status 200 and the following JSON body:
[
	{
		"id": 1,
		"name_english": "Bulbasaur",
		"name_japanese": "フシギダネ",
		"name_chinese": "妙蛙种子",
		"name_french": "Bulbizarre",
		"hp": 45,
		"attack": 49,
		"defense": 49,
		"special_attack": 65,
		"special_defense": 65,
		"speed": 45,
		"types": [
			{
				"type": "Grass"
			},
			{
				"type": "Poison"
			}
		]
	},
	{
		"id": 2,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant