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] Implement Get Pokemon by ID #2

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

[Feature] Implement Get Pokemon by ID #2

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 support the ability to get a Pokemon by ID.

Expected behavior

  1. a request to http://localhost:8000/pokemon/482/ should return HTTP status 200 and the following JSON body
{
	"id": 482,
	"name_english": "Azelf",
	"name_japanese": "アグノム",
	"name_chinese": "亚克诺姆",
	"name_french": "Créfadet",
	"hp": 75,
	"attack": 70,
	"defense": 125,
	"special_attack": 125,
	"special_defense": 70,
	"speed": 115,
	"types": [
		{
			"type": "Psychic"
		}
	]
}
  1. a request to http://localhost:8000/pokemon/999999999 should return HTTP status 404 and the following JSON body
{
    error: "Not found"
}
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