From 73f68e6615d81599d40e9a268e66eba11bf4ff4e Mon Sep 17 00:00:00 2001 From: Luke Chesser Date: Mon, 11 Dec 2017 13:29:02 -0500 Subject: [PATCH 1/4] Update photo download method to use the full URL returned --- src/Photo.php | 13 +++++++---- tests/fixtures/photos.yml | 48 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/src/Photo.php b/src/Photo.php index 4f47b01..5b3db95 100644 --- a/src/Photo.php +++ b/src/Photo.php @@ -11,7 +11,7 @@ class Photo extends Endpoint { private $photographer; - + /** * Retrieve the a photo object from the ID specified * @@ -21,7 +21,7 @@ class Photo extends Endpoint public static function find($id) { $photo = json_decode(self::get("/photos/{$id}")->getBody(), true); - + return new self($photo); } @@ -197,12 +197,15 @@ public function statistics($resolution = 'days', $quantity = 30) } /** - * Returns download link for a photo - * @return string - url to download + * Triggers a download for a photo + * Required under API Guidelines + * @return string - full-res photo URL for downloading */ public function download() { - $link = self::get("/photos/{$this->id}/download"); + $download_path = parse_url($this->links['download_location'], PHP_URL_PATH); + $download_query = parse_url($this->links['download_location'], PHP_URL_QUERY); + $link = self::get($download_path + "?" + $download_query); $linkClass = \GuzzleHttp\json_decode($link->getBody()); return $linkClass->url; } diff --git a/tests/fixtures/photos.yml b/tests/fixtures/photos.yml index 5075d36..14e2fa8 100644 --- a/tests/fixtures/photos.yml +++ b/tests/fixtures/photos.yml @@ -30,7 +30,7 @@ "Connection": "keep-alive", "Server": "thin" }, - "body": "{\"id\":\"ZUaqqMxtxYk\",\"width\":4608,\"height\":3072,\"color\":\"#5E7285\",\"urls\":{\"regular\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=1080\\u0026fit=max\\u0026s=1e42060181854ebad501daf0b25865ee\",\"small\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=400\\u0026fit=max\\u0026s=41bfa165f9e35bbaad529ea9a0029a3e\",\"thumb\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=200\\u0026fit=max\\u0026s=b223d24e28ba1ced6731e98d46cd5f83\"},\"links\":{\"self\":\"https:\/\/api.unsplash.com:80\/photos\/ZUaqqMxtxYk\",\"html\":\"http:\/\/lvh.me:3000\/photos\/ZUaqqMxtxYk\",\"download\":\"http:\/\/lvh.me:3000\/photos\/ZUaqqMxtxYk\/download\"},\"user\":{\"id\":\"RWFu3buoUS0\",\"username\":\"andy_brunner\",\"name\":\"Andy Brunner\",\"links\":{\"self\":\"https:\/\/api.unsplash.com:80\/users\/andy_brunner\",\"html\":\"http:\/\/lvh.me:3000\/andy_brunner\",\"photos\":\"https:\/\/api.unsplash.com:80\/users\/andy_brunner\/photos\"}}}" + "body": "{\"id\":\"ZUaqqMxtxYk\",\"width\":4608,\"height\":3072,\"color\":\"#5E7285\",\"urls\":{\"regular\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=1080\\u0026fit=max\\u0026s=1e42060181854ebad501daf0b25865ee\",\"small\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=400\\u0026fit=max\\u0026s=41bfa165f9e35bbaad529ea9a0029a3e\",\"thumb\":\"https:\/\/unsplash.imgix.net\/photo-1428681756973-d318f055795a?q=75\\u0026fm=jpg\\u0026w=200\\u0026fit=max\\u0026s=b223d24e28ba1ced6731e98d46cd5f83\"},\"links\":{\"self\":\"https:\/\/api.unsplash.com:80\/photos\/ZUaqqMxtxYk\",\"html\":\"http:\/\/lvh.me:3000\/photos\/ZUaqqMxtxYk\",\"download\":\"http:\/\/lvh.me:3000\/photos\/ZUaqqMxtxYk\/download\",\"download_location\":\"https:\/\/api.unsplash.com\/photos\/ZUaqqMxtxYk\/download\"},\"user\":{\"id\":\"RWFu3buoUS0\",\"username\":\"andy_brunner\",\"name\":\"Andy Brunner\",\"links\":{\"self\":\"https:\/\/api.unsplash.com:80\/users\/andy_brunner\",\"html\":\"http:\/\/lvh.me:3000\/andy_brunner\",\"photos\":\"https:\/\/api.unsplash.com:80\/users\/andy_brunner\/photos\"}}}" } },{ "request": { @@ -800,4 +800,50 @@ }, "body": "{\"id\":\"GQcfdBoVB_g\",\"created_at\":\"2015-04-29T09:33:41-04:00\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"width\":3008,\"height\":2000,\"color\":\"#A99381\",\"downloads\":5,\"likes\":0,\"liked_by_user\":false,\"exif\":{\"make\":\"Nikon\",\"model\":\"NIKON D40\",\"exposure_time\":\"1\/200\",\"aperture\":\"7.1\",\"focal_length\":\"14\",\"iso\":200},\"current_user_collections\":[],\"urls\":{\"raw\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486\",\"full\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=100&fm=jpg&crop=entropy&cs=tinysrgb&s=b7056b998528f052b26e10a06bf2c5ce\",\"regular\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=6072239c8a92496268e802d97db4ccf7\",\"small\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&s=1705dc81cf04b429315a37af1c0b1354\",\"thumb\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=621532727a456e42e30e9bc9f7bc82a5\"},\"categories\":[{\"id\":4,\"title\":\"Nature\",\"photo_count\":54184,\"links\":{\"self\":\"https:\/\/api.unsplash.com\/categories\/4\",\"photos\":\"https:\/\/api.unsplash.com\/categories\/4\/photos\"}}],\"links\":{\"self\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\",\"html\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\",\"download\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\/download\",\"download_location\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\/download\"},\"user\":{\"id\":\"76cpHRrA1ZA\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"username\":\"hughbertd\",\"name\":\"Hugh Downer\",\"first_name\":\"Hugh\",\"last_name\":\"Downer\",\"portfolio_url\":\"http:\/\/hughbertd.github.io\",\"bio\":\"\",\"location\":null,\"total_likes\":1,\"total_photos\":1,\"total_collections\":1,\"profile_image\":{\"small\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=32&w=32&s=0ad68f44c4725d5a3fda019bab9d3edc\",\"medium\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=64&w=64&s=356bd4b76a3d4eb97d63f45b818dd358\",\"large\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=128&w=128&s=ee8bbf5fb8d6e43aaaa238feae2fe90d\"},\"links\":{\"self\":\"https:\/\/api.unsplash.com\/users\/hughbertd\",\"html\":\"http:\/\/unsplash.com\/@hughbertd\",\"photos\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/photos\",\"likes\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/likes\",\"portfolio\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/portfolio\",\"following\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/following\",\"followers\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/followers\"}}}" } +}],{ + "request": { + "method": "GET", + "url": "https:\/\/api.unsplash.com\/0", + "headers": { + "Host": "api.unsplash.com", + "Accept-Encoding": null, + "User-Agent": "GuzzleHttp\/6.2.1 curl\/7.54.0 PHP\/5.6.32", + "Authorization": "Bearer 582c5d7ebe28bd707751a43c8e22dc5c0a4ba0a60dbe69d520677f47b7cfcc1b", + "Accept": null + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "404", + "message": "Not Found" + }, + "headers": { + "Server": "Cowboy", + "Content-Type": "application\/json", + "Access-Control-Allow-Origin": "*", + "Access-Control-Request-Method": "*", + "Access-Control-Allow-Headers": "*", + "Access-Control-Expose-Headers": "Link,X-Total,X-Per-Page,X-RateLimit-Limit,X-RateLimit-Remaining", + "Cache-Control": "no-cache", + "X-Ratelimit-Limit": "100", + "X-Ratelimit-Remaining": "98", + "X-Request-Id": "8a126ad8-7461-4163-a67d-4ac39f7bb617", + "X-Runtime": "0.009970", + "Strict-Transport-Security": "max-age=31536000", + "Via": "1.1 vegur, 1.1 varnish, 1.1 varnish", + "Fastly-Debug-Digest": "a2fe117272e601d299a84ba9246ae472aa17500e6227319a5de9bff63a5564f4", + "Content-Length": "38", + "Accept-Ranges": "bytes", + "Date": "Mon, 11 Dec 2017 18:26:25 GMT", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-iad2142-IAD, cache-yul8924-YUL", + "X-Cache": "MISS, MISS", + "X-Cache-Hits": "0, 0", + "X-Timer": "S1513016786.729234,VS0,VE113", + "Vary": "Origin" + }, + "body": "{\"errors\":[\"Unable to find endpoint\"]}" + } }] \ No newline at end of file From d9c65bd500bbcfb1f29865c5136169f7171d69d3 Mon Sep 17 00:00:00 2001 From: Luke Chesser Date: Mon, 11 Dec 2017 13:32:54 -0500 Subject: [PATCH 2/4] Update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b26e42e..4197a83 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A PHP client for the [Unsplash API](https://unsplash.com/documentation). - [Official documentation](https://unsplash.com/documentation) - [Changelog](https://github.com/CrewLabs/Unsplash-PHP/blob/master/CHANGELOG.md) -Every application must abide by the [API Guidelines](https://medium.com/unsplash/unsplash-api-guidelines-28e0216e6daa). +**Note:** Every application must abide by the [API Guidelines](https://medium.com/unsplash/unsplash-api-guidelines-28e0216e6daa). Specifically, remember to [hotlink images](https://medium.com/unsplash/unsplash-api-guidelines-hotlinking-images-6c6b51030d2a) and [trigger a download when appropriate](https://medium.com/unsplash/unsplash-api-guidelines-triggering-a-download-c39b24e99e02). ## Installation @@ -27,7 +27,7 @@ Before using, configure the client with your application ID and secret. If you d Note that if you're just using actions that require the [public permission scope](#permission-scopes), only the `applicationId` is required. -Note that if utmSource is omitted from $credentials a notice will be raised +Note that if utmSource is omitted from $credentials a notice will be raised ```php Crew\Unsplash\HttpClient::init([ @@ -38,7 +38,7 @@ Crew\Unsplash\HttpClient::init([ ]); ``` ### Authorization workflow -To access actions that are non-public (i.e. uploading a photo to a specific account), you'll need a user's permission to access their data. +To access actions that are non-public (i.e. uploading a photo to a specific account), you'll need a user's permission to access their data. An example of this flow can be found in /examples/oauth-flow.php @@ -340,7 +340,7 @@ Update a collection on the user's behalf. **Arguments** - Argument | Type | Opt/Required | Note + Argument | Type | Opt/Required | Note ---------------|---------|---------------------- `$parameters` | array | Required | The following keys can be set in the array : `title`, `description`, `private` From 9bbad64b2a6d0e27c34f7718fa4e505b034013f1 Mon Sep 17 00:00:00 2001 From: Luke Chesser Date: Mon, 11 Dec 2017 13:39:53 -0500 Subject: [PATCH 3/4] Fix concat --- src/Photo.php | 2 +- tests/fixtures/photos.yml | 49 ++------------------------------------- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/Photo.php b/src/Photo.php index 5b3db95..0c9900a 100644 --- a/src/Photo.php +++ b/src/Photo.php @@ -205,7 +205,7 @@ public function download() { $download_path = parse_url($this->links['download_location'], PHP_URL_PATH); $download_query = parse_url($this->links['download_location'], PHP_URL_QUERY); - $link = self::get($download_path + "?" + $download_query); + $link = self::get($download_path . "?" . $download_query); $linkClass = \GuzzleHttp\json_decode($link->getBody()); return $linkClass->url; } diff --git a/tests/fixtures/photos.yml b/tests/fixtures/photos.yml index 14e2fa8..9623888 100644 --- a/tests/fixtures/photos.yml +++ b/tests/fixtures/photos.yml @@ -800,50 +800,5 @@ }, "body": "{\"id\":\"GQcfdBoVB_g\",\"created_at\":\"2015-04-29T09:33:41-04:00\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"width\":3008,\"height\":2000,\"color\":\"#A99381\",\"downloads\":5,\"likes\":0,\"liked_by_user\":false,\"exif\":{\"make\":\"Nikon\",\"model\":\"NIKON D40\",\"exposure_time\":\"1\/200\",\"aperture\":\"7.1\",\"focal_length\":\"14\",\"iso\":200},\"current_user_collections\":[],\"urls\":{\"raw\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486\",\"full\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=100&fm=jpg&crop=entropy&cs=tinysrgb&s=b7056b998528f052b26e10a06bf2c5ce\",\"regular\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=6072239c8a92496268e802d97db4ccf7\",\"small\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&s=1705dc81cf04b429315a37af1c0b1354\",\"thumb\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=621532727a456e42e30e9bc9f7bc82a5\"},\"categories\":[{\"id\":4,\"title\":\"Nature\",\"photo_count\":54184,\"links\":{\"self\":\"https:\/\/api.unsplash.com\/categories\/4\",\"photos\":\"https:\/\/api.unsplash.com\/categories\/4\/photos\"}}],\"links\":{\"self\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\",\"html\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\",\"download\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\/download\",\"download_location\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\/download\"},\"user\":{\"id\":\"76cpHRrA1ZA\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"username\":\"hughbertd\",\"name\":\"Hugh Downer\",\"first_name\":\"Hugh\",\"last_name\":\"Downer\",\"portfolio_url\":\"http:\/\/hughbertd.github.io\",\"bio\":\"\",\"location\":null,\"total_likes\":1,\"total_photos\":1,\"total_collections\":1,\"profile_image\":{\"small\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=32&w=32&s=0ad68f44c4725d5a3fda019bab9d3edc\",\"medium\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=64&w=64&s=356bd4b76a3d4eb97d63f45b818dd358\",\"large\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=128&w=128&s=ee8bbf5fb8d6e43aaaa238feae2fe90d\"},\"links\":{\"self\":\"https:\/\/api.unsplash.com\/users\/hughbertd\",\"html\":\"http:\/\/unsplash.com\/@hughbertd\",\"photos\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/photos\",\"likes\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/likes\",\"portfolio\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/portfolio\",\"following\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/following\",\"followers\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/followers\"}}}" } -}],{ - "request": { - "method": "GET", - "url": "https:\/\/api.unsplash.com\/0", - "headers": { - "Host": "api.unsplash.com", - "Accept-Encoding": null, - "User-Agent": "GuzzleHttp\/6.2.1 curl\/7.54.0 PHP\/5.6.32", - "Authorization": "Bearer 582c5d7ebe28bd707751a43c8e22dc5c0a4ba0a60dbe69d520677f47b7cfcc1b", - "Accept": null - } - }, - "response": { - "status": { - "http_version": "1.1", - "code": "404", - "message": "Not Found" - }, - "headers": { - "Server": "Cowboy", - "Content-Type": "application\/json", - "Access-Control-Allow-Origin": "*", - "Access-Control-Request-Method": "*", - "Access-Control-Allow-Headers": "*", - "Access-Control-Expose-Headers": "Link,X-Total,X-Per-Page,X-RateLimit-Limit,X-RateLimit-Remaining", - "Cache-Control": "no-cache", - "X-Ratelimit-Limit": "100", - "X-Ratelimit-Remaining": "98", - "X-Request-Id": "8a126ad8-7461-4163-a67d-4ac39f7bb617", - "X-Runtime": "0.009970", - "Strict-Transport-Security": "max-age=31536000", - "Via": "1.1 vegur, 1.1 varnish, 1.1 varnish", - "Fastly-Debug-Digest": "a2fe117272e601d299a84ba9246ae472aa17500e6227319a5de9bff63a5564f4", - "Content-Length": "38", - "Accept-Ranges": "bytes", - "Date": "Mon, 11 Dec 2017 18:26:25 GMT", - "Age": "0", - "Connection": "keep-alive", - "X-Served-By": "cache-iad2142-IAD, cache-yul8924-YUL", - "X-Cache": "MISS, MISS", - "X-Cache-Hits": "0, 0", - "X-Timer": "S1513016786.729234,VS0,VE113", - "Vary": "Origin" - }, - "body": "{\"errors\":[\"Unable to find endpoint\"]}" - } -}] \ No newline at end of file +}] +}] From bf909c3d59b35f67c0edea4782dad2600b3774dd Mon Sep 17 00:00:00 2001 From: Luke Chesser Date: Mon, 11 Dec 2017 13:46:58 -0500 Subject: [PATCH 4/4] Remove extra closing JSON --- tests/fixtures/photos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/fixtures/photos.yml b/tests/fixtures/photos.yml index 9623888..9676e88 100644 --- a/tests/fixtures/photos.yml +++ b/tests/fixtures/photos.yml @@ -801,4 +801,3 @@ "body": "{\"id\":\"GQcfdBoVB_g\",\"created_at\":\"2015-04-29T09:33:41-04:00\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"width\":3008,\"height\":2000,\"color\":\"#A99381\",\"downloads\":5,\"likes\":0,\"liked_by_user\":false,\"exif\":{\"make\":\"Nikon\",\"model\":\"NIKON D40\",\"exposure_time\":\"1\/200\",\"aperture\":\"7.1\",\"focal_length\":\"14\",\"iso\":200},\"current_user_collections\":[],\"urls\":{\"raw\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486\",\"full\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=100&fm=jpg&crop=entropy&cs=tinysrgb&s=b7056b998528f052b26e10a06bf2c5ce\",\"regular\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=6072239c8a92496268e802d97db4ccf7\",\"small\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&s=1705dc81cf04b429315a37af1c0b1354\",\"thumb\":\"https:\/\/images.unsplash.com\/photo-1430314409749-d01e45472486?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=621532727a456e42e30e9bc9f7bc82a5\"},\"categories\":[{\"id\":4,\"title\":\"Nature\",\"photo_count\":54184,\"links\":{\"self\":\"https:\/\/api.unsplash.com\/categories\/4\",\"photos\":\"https:\/\/api.unsplash.com\/categories\/4\/photos\"}}],\"links\":{\"self\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\",\"html\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\",\"download\":\"http:\/\/unsplash.com\/photos\/GQcfdBoVB_g\/download\",\"download_location\":\"https:\/\/api.unsplash.com\/photos\/GQcfdBoVB_g\/download\"},\"user\":{\"id\":\"76cpHRrA1ZA\",\"updated_at\":\"2017-04-05T04:37:25-04:00\",\"username\":\"hughbertd\",\"name\":\"Hugh Downer\",\"first_name\":\"Hugh\",\"last_name\":\"Downer\",\"portfolio_url\":\"http:\/\/hughbertd.github.io\",\"bio\":\"\",\"location\":null,\"total_likes\":1,\"total_photos\":1,\"total_collections\":1,\"profile_image\":{\"small\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=32&w=32&s=0ad68f44c4725d5a3fda019bab9d3edc\",\"medium\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=64&w=64&s=356bd4b76a3d4eb97d63f45b818dd358\",\"large\":\"https:\/\/images.unsplash.com\/placeholder-avatars\/extra-large.jpg?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=128&w=128&s=ee8bbf5fb8d6e43aaaa238feae2fe90d\"},\"links\":{\"self\":\"https:\/\/api.unsplash.com\/users\/hughbertd\",\"html\":\"http:\/\/unsplash.com\/@hughbertd\",\"photos\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/photos\",\"likes\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/likes\",\"portfolio\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/portfolio\",\"following\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/following\",\"followers\":\"https:\/\/api.unsplash.com\/users\/hughbertd\/followers\"}}}" } }] -}]