GET /api/dogs/populate/
This endpoint will:
- populate the database with 2 dozen random dog photos
- return an array of all dogs in the database
Request:
GET https://nifty-dogs-api.herokuapp.com/api/dogs/populate/
Response:
[
{
"id": 50,
"breed": "springer",
"sub_breed": "english",
"original_url": "https://images.dog.ceo/breeds/springer-english/n02102040_5096.jpg",
"transformed_url":
"https://ik.imagekit.io/rfxlfa3n0/tr:ot-Dog%20Breed%20springer,ots-45,otbg-white/https://images.dog.ceo/breeds/springer-english/n02102040_5096.jpg",
"unique_photo_id": "n02102040_5096",
"metadata": {
"exif": {},
"size": 38538,
"pHash": "7eadabaeb1a9a33a",
"width": 500,
"format": "jpg",
"height": 334,
"density": 72,
"quality": 0,
"hasColorProfile": false,
"hasTransparency": false
},
"created_at": "2022-12-13T01:56:17.584146Z",
"updated_at": "2022-12-13T01:56:17.584165Z"
},
{
"id": 51,
"breed": "hound",
"sub_breed": "afghan",
"original_url": "https://images.dog.ceo/breeds/hound-afghan/n02088094_3059.jpg",
"transformed_url":
"https://ik.imagekit.io/rfxlfa3n0/tr:ot-Dog%20Breed%20hound,ots-45,otbg-white/https://images.dog.ceo/breeds/hound-afghan/n02088094_3059.jpg",
"unique_photo_id": "n02088094_3059",
"metadata": {
"exif": {},
"size": 45794,
"pHash": "f1ef8f8f21d8c673",
"width": 371,
"format": "jpg",
"height": 500,
"density": 72,
"quality": 0,
"hasColorProfile": false,
"hasTransparency": false
},
"created_at": "2022-12-13T01:56:19.790191Z",
"updated_at": "2022-12-13T01:56:19.790209Z"
}
]