Clone
put your firebase service_account json in .env/
copy .env/.example to .env/dev
Replace the keys with valid data
npm start
GET /api/users
{
"users": [
{
"uid": "10sDkLOBjPgvdEF5rWjWzOauByH3",
"email": "[email protected]",
"emailVerified": false,
"disabled": false,
"metadata": {
"lastSignInTime": "Thu, 02 Nov 2017 20:08:35 GMT",
"creationTime": "Wed, 01 Nov 2017 15:20:05 GMT"
},
"passwordHash": "iTmHsLKvQxVt9xTuwKDemDCmANazzE5suFMmZhGgrInMTI2eoiwyaNy-_J0vxyIWGsUxDVvbk7O_oBtNa4KK5g==",
"passwordSalt": "26z6jSfCWYb-5Q==",
"providerData": [
{
"uid": "[email protected]",
"email": "[email protected]",
"providerId": "password"
}
]
}
]
}
IMPORTANT: Works only with firebase authentication token
Add the x-auth
header with the firebase token value
GET /api/pokemons
{
"success": true,
"pokemons": [
{
"id": "-KxyMB3Xpi5kpKOdScJI",
"abilities": "Coding123",
"gender": "M",
"height": "128 cm",
"name": "Codosaurus1",
"weight": "650kg"
},
{
"id": "-KxyQcmLYL1svdrqXF2T",
"abilities": "Loser",
"gender": "M",
"height": "128 cm",
"name": "Gerula",
"weight": "60kg"
}
]
}
GET /api/pokemon/:pokemonId
{
"success": true,
"pokemon": {
"abilities": "Coding123",
"gender": "M",
"height": "128 cm",
"name": "Codosaurus1",
"weight": "650kg",
"id": "-KxyMB3Xpi5kpKOdScJI"
}
}
POST /api/pokemon
Post body:
{
"abilities": "Coding",
"gender": "M",
"height": "128 cm",
"name": "Codosaurus1",
"weight": "65kg"
}
Response:
{
"success": true,
"pokemon": {
"id": "-KxyMB3Xpi5kpKOdScJI",
"abilities": "Coding",
"gender": "M",
"height": "128 cm",
"name": "Codosaurus1",
"weight": "65kg"
}
}
PUT /api/pokemon/:pokemonId
PUT body:
{
"abilities": "newAbility",
"gender": "M",
"height": "128 cm",
"name": "New name",
"weight": "65kg"
}
Response:
{
"success": true
}
DELTE /api/pokemon/:pokemonId
Response:
{
"success": true
}