poke-amar-john is a web api that tries to capture a bit of the magic of pokemon we all know and love.

https://pokeapi-amar-john.herokuapp.com/api/v1

In order to use this API you must sign up and create a trainer in order to use this service.

Afterwords, simply just login

Auth User

Endpoint Description
GET

/login

Login to your Trainer

	
Example Trainer
{
	"trainerId": 200,
	"firsttName": "soos",
	"lastName": "kida",
	"password": "password",
	"email": "sookida@sookida.com",
	"userName": "Sookida",
	"party_partyId": 500,
	"trainer_image": "https://firebasestorage.googleapis.com/v0/b/pokemonapi-5ae54.appspot.com/o/1.jpg?alt=media&token=3766614b-db92-4265-97eb-529a778"
} 		
	
	
The following is a sample response from the /login endpoint:
{
	"token": "oi[opiautaopweieutaoyu099awtybaw0teu9v..."
} 		
	

Pokemon

Pokemon are creatures of all shapes and sizes who live in the wild or alongside humans

Pokemon Endpoints

Endpoint Description
GET

/pokemon

Gets a Pokemon

PUT

/pokemon/update

Updates a pokemon's properties such as [name, hp, attack, generation, etc...]

DEL

/pokemon/delete

Deletes a pokemon

POST

/pokemon/create

Creates a new pokemon

	
Example Pokemon
{
	"pokeNo": "1",
	"name": "Bulbasaur",
	"type1": "Grass",
	"type2": "Poison",
	"total": 318,
	"hp": 45,
	"attack": 49,
	"defense": 49,
	"spec_atk": 65,
	"spec_def": 65,
	"speed": 45,
	"generation": 1,
	"legendary": 0,
	"image": "https://firebasestorage.googleapis.com/v0/b/pokemonapi-5ae54.appspot.com/o/1.jpg?alt=media&token=3766614b-db92-4265-97eb-529a778"
} 
		
	
	
The following is a sample response from the /pokemon endpoint:
{
	"pokeNo": "75",
	"name": "Graveler",
	"type1": "Rock",
	"type2": "Ground",
	"total": 390,
	"hp": 55,
	"attack": 95,
	"defense": 115,
	"spec_atk": 45,
	"spec_def": 45,
	"speed": 35,
	"generation": 1,
	"legendary": 0,
	"image": "https://firebasestorage.googleapis.com/v0/b/pokemonapi-5ae54.appspot.com/o/75.jpg?alt=media&token=3766614b-db92-4265-97eb-529a77"
} 		


The following is a sample response from the /pokemon/update endpoint:
{
	"trainer":
		{
			"message": "Successfully UPDATED Graveler."
		}	
}


The following is a sample response from the /pokemon/delete endpoint:
{
	"deletedPokemon":
		{
			"message": "Successfully DELETED No.152 pokemon."
		}	
}


The following is a sample response from the /pokemon/create endpoint:
{
	"pokeNo": "152",
	"name": "Sookida",
	"type1": "Dragon",
	"type2": "Fairy",
	"total": 390,
	"hp": 515,
	"attack": 100,
	"defense": 115,
	"spec_atk": 100,
	"spec_def": 100,
	"speed": 100,
	"generation": 1,
	"legendary": 1,
	"image": "https://firebasestorage.googleapis.com/v0/b/pokemonapi-5ae54.appspot.com/o/75.jpg?alt=media&token=3766614b-db92-4265-97eb-529a77"
} 
	

Trainers

Trainers is a person who catches, trains, cares for, and battles with Pokémon. The majority of people within the known Pokémon world are Trainers

Trainer Endpoints

Endpoint Description
GET

/trainer

Gets a Trainer

PUT

/trainer/update

Updates a Trainer's information [first name, last name, etc...]

DEL

/trainer/delete

Deletes a Trainer

POST

/trainer/create

Creates a new Trainer

POST

/trainer/image

Posts an image to a Trainer

	
Example Trainer
{
	"trainerId": 200,
	"firsttName": "soos",
	"lastName": "kida",
	"password": "password",
	"email": "sookida@sookida.com",
	"userName": "Sookida",
	"party_partyId": 500,
	"trainer_image": "https://firebasestorage.googleapis.com/v0/b/pokemonapi-5ae54.appspot.com/o/1.jpg?alt=media&token=3766614b-db92-4265-97eb-529a778"
}  


The following is a sample response from the /trainer endpoint:
{
	"trainer":
		{
			"trainerId": 200,
"firsttName": "soos",
"lastName": "kida",
"password": "password",
"email":  "sookida@sookida.com",
"userName":  "Sookida",
"party_partyId": 500,
"trainer_image": 500
		}	
}


The following is a sample response from the /trainer/update endpoint:
{
	"trainer":{
			"message": "Successfully updated soos kida sookida@sookida.com."
		}	
}


The following is a sample response from the /trainer/delete endpoint:
{
	"trainer":
		{
			"message": "Successfully deleted trainer."
		}	
}


The following is a sample response from the /trainer/create endpoint:
{
	"token": "oi[opiautaopweieutaoyu099awtybaw0teu9v..."
} 
	

Party

Parties consists of up to 6 pokemon a Trainer brings on their journey.

Party Endpoints

Endpoint Description
GET

/party

Gets a party

GET

/party/id

Gets a party id

PUT

/party/add

Adds a pokemon to a party

DEL

/party/delete

Deletes a Pokemon from a party

POST

/party/create

Creates a new party

	
Example Party
{
	"partyId": 500
}  	


The following is a sample response from the /party endpoint:
[
	{
		"partyId": 82
	} , 		
	{
		"partyId": 138
	}  		
]  		


The following is a sample response from the /party/id endpoint:
{
	"partyId": 21
} 


The following is a sample response from the /party/add endpoint:
[
	{
		"pokemon_pokeNo": 82
	}, 		
	{
		"pokemon_pokeNo": 82
	}, 	
	}, 		
	{
		"pokemon_pokeNo": 138
	}, 	
]  	


The following is a sample response from the /party/delete endpoint:
[
	{
		"partyId": 47
	}, 		
	{
		"partyId": 138
	{
]


The following is a sample response from the /party/create endpoint:
{
	"partyId": "25"
}