One of the features of the taxi renting service application that I'm writing is to add a taxi with random properties, including a photo. When I make a get request to the Unsplash API service, I should be receiving a photo with specific measures, based on their documentation: https://unsplash.com/documentation#get-a-random-photo
The call I make is:
$http.get('https://api.unsplash.com/photos/random?client_id=7b8105b594859445adc64d0dfe73fc9282dda72dfc283476dd166899a441df10&query=taxi&h=500&w=300');
Notice the '&h=500&w=300'. This, however, always produces a photo of random measurements, even though I followed their documentation. I am relatively new to programming and even though I searched for a solution, I did not find it, so I would very much appreciate your help.
Note: Supplying the optional w or h parameters will result in the custom photo URL being added to the urls object:
{
"urls": {
"raw": "...",
"full": "...",
"regular": "...",
"small": "...",
"thumb": "...",
"custom": "https://images.unsplash.com/your-custom-image.jpg"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With