Closed riza2359 closed 7 years ago
Hi @riza2359, I will take a closer look later in the day.
Hi @dechuck, sorry to bug you, did you manage to look at the issue?
Hey @riza2359,
I wasn't able to reproduce the issue, on both php 5.6 and php 7.1 Do you have more information?
cc. @aaronklaassen
Hi, can help clarifying what other information I should provide?
I'm using Laravel and I'm trying to do this:
public function searchImages($query)
{
\Crew\Unsplash\HttpClient::init([
'applicationId' => 'appId'
]);
$photos = \Crew\Unsplash\Photo::search($query);
return $photos;
}
I don't pass the app secret because I only want to retrieve public photos. Currently I can get it work by bypassing the SDK with this code:
public function searchImages($query)
{
$client = new GuzzleHttp\Client();
$res = $client->get("https://api.unsplash.com/search/photos?query={$query}&client_id=appId");
$data = json_decode($res->getBody()->getContents());
$images = $data->results;
}
OS using macOS sierra.
Hello.
I have the same issue. Exception in a Uri.php when calling static method "all" in class Photo. At the first params sending string "photos" and then
The path of a URI with an authority must start with a slash "/" or be empty.
Same issue as well, to do with BLOB storage.
no fix yet - if I figure it out will post what I did.
Hi, I'm having the exact same issue on Laravel 5.4. Any updates about this?
Hey folks. Sorry for the delay here. I'll take a look asap.
It's caused by an update in guzzle client that a uri must start with a leading / or be empty. I have added it in a pull request.. https://github.com/unsplash/unsplash-php/pull/49/commits/590bb78551cc83c0f67465beb1df6f3073cfeb98
^ Fix is available in v2.3.0
Hi, I got InvalidArgumentException in Uri.php line 693: The path of a URI with an authority must start with a slash "/" or be empty
This is my code:
This is composer.json:
PHP -v:
PHP 7.0.9 (cli) (built: Aug 26 2016 06:17:04) ( NTS )
And the error stack:
Is my implementation wrong?