Skip to content

Commit

Permalink
add animals crud endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianNorbertoEscobar committed Jul 7, 2023
1 parent 13cc205 commit 549209f
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 2 deletions.
111 changes: 111 additions & 0 deletions ADOPTAME-API.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,117 @@
}
},
"response": []
},
{
"name": "animales",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:5000/animales",
"host": [
"localhost"
],
"port": "5000",
"path": [
"animales"
]
}
},
"response": []
},
{
"name": "animal",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:5000/animales/1",
"host": [
"localhost"
],
"port": "5000",
"path": [
"animales",
"1"
]
}
},
"response": []
},
{
"name": "animales",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"adoptado\": false,\r\n \"castrado\": true,\r\n \"desparasitado\": true,\r\n \"edad\": 3,\r\n \"genero\": \"femenino\",\r\n \"id_animal_tipo\": 1,\r\n \"nombre\": \"Amaia\",\r\n \"raza\": \"mestiza\",\r\n \"url_imagen\": \"link\",\r\n \"vacunado\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:5000/animales",
"host": [
"localhost"
],
"port": "5000",
"path": [
"animales"
]
}
},
"response": []
},
{
"name": "animales",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"adoptado\": false,\r\n \"castrado\": true,\r\n \"desparasitado\": true,\r\n \"edad\": 3,\r\n \"genero\": \"femenino\",\r\n \"id_animal_tipo\": 1,\r\n \"nombre\": \"Amaia\",\r\n \"raza\": \"linda\",\r\n \"url_imagen\": \"link\",\r\n \"vacunado\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:5000/animales/27",
"host": [
"localhost"
],
"port": "5000",
"path": [
"animales",
"27"
]
}
},
"response": []
},
{
"name": "animales",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:5000/animales/27",
"host": [
"localhost"
],
"port": "5000",
"path": [
"animales",
"27"
]
}
},
"response": []
}
]
}
13 changes: 13 additions & 0 deletions animal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Animal:
def __init__(self, id, nombre, genero, edad, raza, id_animal_tipo, castrado, desparasitado, vacunado, adoptado, url_imagen):
self.id = id
self.nombre = nombre
self.genero = genero
self.edad = edad
self.raza = raza
self.id_animal_tipo = id_animal_tipo
self.castrado = castrado
self.desparasitado = desparasitado
self.vacunado = vacunado
self.adoptado = adoptado
self.url_imagen = url_imagen
Loading

0 comments on commit 549209f

Please sign in to comment.