This project was created using:
- JavaScript
- NodeJs
- ExpressJs
- Express-session
- SqLite
- PostgreSQL
- dotenv
- Helmet
- Cors
Donwload the project and install dependecies with npm i the run npm run develop or npm start
Or go to reqbin.com, and download its extension
- You have to register to see what the api offers.
Post:
{
"username": "Isaac",
"password": "314"
}
- Then, login.
Post:
{
"username": "Isaac",
"password": "314"
}
You can logout easily accesing to https://birds-margarita.herokuapp.com/api/auth/logout
- Check all users in the API and their password (encrypted)
3.5) Chack info of a single user. Write the username after user/ route.Be careful, It's case sensitive
- Check all the birds that exist in the database. You will be able to read their common name, scientific name and description.
Get:
- Add a bird to the API. "common name" and "description" can not be null.
Post:
{
"common_name": "Aguila Calva",
"scientific_name": "Aguilus Aguilarus",
"description": "Vuela sobre las planicies de la peninsula de Macanao, caza ratones."
}
- Check a Bird by ID. Write the ID after the birds/ route Get:
- Re-write bird info. Write the ID after the birds/ route Patch:
{
"common_name": "Aguila Espartana",
"scientific_name": "Aguilaris Espartanus",
"description": "Vuela bajo, cazando todo tipo de animales."
}
- Delete bird info. Write the ID after the birds/ route Delete:
- If you want to add an observation about a bird. Write the ID of the bird after the birds/ route and before /observation (Must provide "watcher" and "observation" fields):
https://birds-margarita.herokuapp.com/api/birds/7/observations
Post:
{
"watcher": "Isaac",
"observation": "Observé una bandada en Porlamar"
}
- Get all the observations about a bird . Write the ID of the bird after the birds/ route and before /observations:
Get:
https://birds-margarita.herokuapp.com/api/birds/7/observations
- Delete observation. Write the ID of the observation after /observations route:
Delete: