I think maybe we should rename and use plural terms for endpoints, /animals/ sound better to me. If we choose to change the URL, we must update the client also.
Tasks:
Create GET endpoint
[ ] /animals/ should return all animals in the DB
[ ] Always return results with pagination.
[ ] We need to look at the query params and check for any of this values in order to filter the data the endpoint responds.
Query parameters:
galgo_filter:
If galgo_filter is "a", returns "adults"
If galgo_filter is "c", returns "puppys"
if galgo_filter is "h", returns "males",
if galgo_filter is "m", returms "females"
galgo_id: Fetch animals by property "id"
galgo_genero: Fetch animals by property "genero"
galgo_etapa: Fetch animals by property "etapa"
galgo_estado: Fetch animals by property "estado" (1: In adoption, 2: ???, adopted: 3)
/Animals:
Current URL: http://www.adoptaungalgoenargentina.com:8080/Animal/ Original implementation
Note:
I think maybe we should rename and use plural terms for endpoints, /animals/ sound better to me. If we choose to change the URL, we must update the client also.
Tasks:
Query parameters:
Options:
}
Returns:
The endpoint should return an array of animals
Curl:
--url http://adoptaungalgoenargentina.com:8080/Animal/