{"action":"created","comment":{"url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/comments/48029562","id":48029562,"diff_hunk":"@@ -58,56 +62,49 @@ public function getBaseUri() {\n      * @param array     $headers        HTTP Headers\n      * @param string    $transaction    Transaction id\n      *\n-     * @return mixed    String or binary content if 200. Null if 304.\n+     * @return mixed    Full response if found.  Null otherwise.\n      */\n-    public function getResource($uri = \"\",\n-                                $headers = [],\n-                                $transaction = \"\") {\n-        // Set headers\n-        $options = ['headers' => $headers];\n-\n-        // Ensure uri takes transaction into account.\n-        $uri = $this->prepareUri($uri, $transaction);\n-\n-        // Send the request.\n-        $response = $this->client->request(\n-            'GET',\n+    public function getResource(\n+        $uri = \"\",\n+        $headers = [],\n+        $transaction = \"\"\n+    ) {\n+        $response = $this->api->getResource(\n             $uri,\n-            $options\n+            $headers,\n+            $transaction\n         );\n-\n-        $code = $response->getStatusCode();\n-\n-        if ($code == 304) {\n+        if ($response->getStatusCode() != 200) {\n             return null;\n         }\n \n-        return $response->getBody();\n+        return $response;","path":"src/Chullo.php","position":88,"original_position":88,"commit_id":"f8a03d7cd4bff0712c4e5e925d70108d03d17829","original_commit_id":"f8a03d7cd4bff0712c4e5e925d70108d03d17829","user":{"login":"daniel-dgi","id":2521309,"avatar_url":"https://avatars.githubusercontent.com/u/2521309?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-dgi","html_url":"https://github.com/daniel-dgi","followers_url":"https://api.github.com/users/daniel-dgi/followers","following_url":"https://api.github.com/users/daniel-dgi/following{/other_user}","gists_url":"https://api.github.com/users/daniel-dgi/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-dgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-dgi/subscriptions","organizations_url":"https://api.github.com/users/daniel-dgi/orgs","repos_url":"https://api.github.com/users/daniel-dgi/repos","events_url":"https://api.github.com/users/daniel-dgi/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-dgi/received_events","type":"User","site_admin":false},"body":"Then use the FedoraApi class?  Isn't that why we made it?","created_at":"2015-12-18T14:32:24Z","updated_at":"2015-12-18T14:32:24Z","html_url":"https://github.com/Islandora-CLAW/chullo/pull/30#discussion_r48029562","pull_request_url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/comments/48029562"},"html":{"href":"https://github.com/Islandora-CLAW/chullo/pull/30#discussion_r48029562"},"pull_request":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30","id":53852353,"html_url":"https://github.com/Islandora-CLAW/chullo/pull/30","diff_url":"https://github.com/Islandora-CLAW/chullo/pull/30.diff","patch_url":"https://github.com/Islandora-CLAW/chullo/pull/30.patch","issue_url":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/30","number":30,"state":"open","locked":false,"title":"Api Changes for PHP Services","user":{"login":"DiegoPino","id":6946023,"avatar_url":"https://avatars.githubusercontent.com/u/6946023?v=3","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"body":"Includes @daniel-dgi updates and refactoring + some minor bug fixes. Will probably need some talk about responses and some tests on the resource methods. ","created_at":"2015-12-16T15:05:14Z","updated_at":"2015-12-18T14:32:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e6e4eb2285aaade4fbf850fc37667a6e928ca17","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30/commits","review_comments_url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30/comments","review_comment_url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/30/comments","statuses_url":"https://api.github.com/repos/Islandora-CLAW/chullo/statuses/f8a03d7cd4bff0712c4e5e925d70108d03d17829","head":{"label":"DiegoPino:api","ref":"api","sha":"f8a03d7cd4bff0712c4e5e925d70108d03d17829","user":{"login":"DiegoPino","id":6946023,"avatar_url":"https://avatars.githubusercontent.com/u/6946023?v=3","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"repo":{"id":43750167,"name":"chullo","full_name":"DiegoPino/chullo","owner":{"login":"DiegoPino","id":6946023,"avatar_url":"https://avatars.githubusercontent.com/u/6946023?v=3","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DiegoPino/chullo","description":"","fork":true,"url":"https://api.github.com/repos/DiegoPino/chullo","forks_url":"https://api.github.com/repos/DiegoPino/chullo/forks","keys_url":"https://api.github.com/repos/DiegoPino/chullo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DiegoPino/chullo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DiegoPino/chullo/teams","hooks_url":"https://api.github.com/repos/DiegoPino/chullo/hooks","issue_events_url":"https://api.github.com/repos/DiegoPino/chullo/issues/events{/number}","events_url":"https://api.github.com/repos/DiegoPino/chullo/events","assignees_url":"https://api.github.com/repos/DiegoPino/chullo/assignees{/user}","branches_url":"https://api.github.com/repos/DiegoPino/chullo/branches{/branch}","tags_url":"https://api.github.com/repos/DiegoPino/chullo/tags","blobs_url":"https://api.github.com/repos/DiegoPino/chullo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DiegoPino/chullo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DiegoPino/chullo/git/refs{/sha}","trees_url":"https://api.github.com/repos/DiegoPino/chullo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DiegoPino/chullo/statuses/{sha}","languages_url":"https://api.github.com/repos/DiegoPino/chullo/languages","stargazers_url":"https://api.github.com/repos/DiegoPino/chullo/stargazers","contributors_url":"https://api.github.com/repos/DiegoPino/chullo/contributors","subscribers_url":"https://api.github.com/repos/DiegoPino/chullo/subscribers","subscription_url":"https://api.github.com/repos/DiegoPino/chullo/subscription","commits_url":"https://api.github.com/repos/DiegoPino/chullo/commits{/sha}","git_commits_url":"https://api.github.com/repos/DiegoPino/chullo/git/commits{/sha}","comments_url":"https://api.github.com/repos/DiegoPino/chullo/comments{/number}","issue_comment_url":"https://api.github.com/repos/DiegoPino/chullo/issues/comments{/number}","contents_url":"https://api.github.com/repos/DiegoPino/chullo/contents/{+path}","compare_url":"https://api.github.com/repos/DiegoPino/chullo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DiegoPino/chullo/merges","archive_url":"https://api.github.com/repos/DiegoPino/chullo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DiegoPino/chullo/downloads","issues_url":"https://api.github.com/repos/DiegoPino/chullo/issues{/number}","pulls_url":"https://api.github.com/repos/DiegoPino/chullo/pulls{/number}","milestones_url":"https://api.github.com/repos/DiegoPino/chullo/milestones{/number}","notifications_url":"https://api.github.com/repos/DiegoPino/chullo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DiegoPino/chullo/labels{/name}","releases_url":"https://api.github.com/repos/DiegoPino/chullo/releases{/id}","created_at":"2015-10-06T12:47:58Z","updated_at":"2015-10-06T12:47:59Z","pushed_at":"2015-12-16T17:33:00Z","git_url":"git://github.com/DiegoPino/chullo.git","ssh_url":"git@github.com:DiegoPino/chullo.git","clone_url":"https://github.com/DiegoPino/chullo.git","svn_url":"https://github.com/DiegoPino/chullo","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Islandora-CLAW:master","ref":"master","sha":"9f538ad01dfe754490c37ca69c96ddba68889741","user":{"login":"Islandora-CLAW","id":15603186,"avatar_url":"https://avatars.githubusercontent.com/u/15603186?v=3","gravatar_id":"","url":"https://api.github.com/users/Islandora-CLAW","html_url":"https://github.com/Islandora-CLAW","followers_url":"https://api.github.com/users/Islandora-CLAW/followers","following_url":"https://api.github.com/users/Islandora-CLAW/following{/other_user}","gists_url":"https://api.github.com/users/Islandora-CLAW/gists{/gist_id}","starred_url":"https://api.github.com/users/Islandora-CLAW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Islandora-CLAW/subscriptions","organizations_url":"https://api.github.com/users/Islandora-CLAW/orgs","repos_url":"https://api.github.com/users/Islandora-CLAW/repos","events_url":"https://api.github.com/users/Islandora-CLAW/events{/privacy}","received_events_url":"https://api.github.com/users/Islandora-CLAW/received_events","type":"Organization","site_admin":false},"repo":{"id":43455417,"name":"chullo","full_name":"Islandora-CLAW/chullo","owner":{"login":"Islandora-CLAW","id":15603186,"avatar_url":"https://avatars.githubusercontent.com/u/15603186?v=3","gravatar_id":"","url":"https://api.github.com/users/Islandora-CLAW","html_url":"https://github.com/Islandora-CLAW","followers_url":"https://api.github.com/users/Islandora-CLAW/followers","following_url":"https://api.github.com/users/Islandora-CLAW/following{/other_user}","gists_url":"https://api.github.com/users/Islandora-CLAW/gists{/gist_id}","starred_url":"https://api.github.com/users/Islandora-CLAW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Islandora-CLAW/subscriptions","organizations_url":"https://api.github.com/users/Islandora-CLAW/orgs","repos_url":"https://api.github.com/users/Islandora-CLAW/repos","events_url":"https://api.github.com/users/Islandora-CLAW/events{/privacy}","received_events_url":"https://api.github.com/users/Islandora-CLAW/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Islandora-CLAW/chullo","description":"","fork":false,"url":"https://api.github.com/repos/Islandora-CLAW/chullo","forks_url":"https://api.github.com/repos/Islandora-CLAW/chullo/forks","keys_url":"https://api.github.com/repos/Islandora-CLAW/chullo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Islandora-CLAW/chullo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Islandora-CLAW/chullo/teams","hooks_url":"https://api.github.com/repos/Islandora-CLAW/chullo/hooks","issue_events_url":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/events{/number}","events_url":"https://api.github.com/repos/Islandora-CLAW/chullo/events","assignees_url":"https://api.github.com/repos/Islandora-CLAW/chullo/assignees{/user}","branches_url":"https://api.github.com/repos/Islandora-CLAW/chullo/branches{/branch}","tags_url":"https://api.github.com/repos/Islandora-CLAW/chullo/tags","blobs_url":"https://api.github.com/repos/Islandora-CLAW/chullo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Islandora-CLAW/chullo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Islandora-CLAW/chullo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Islandora-CLAW/chullo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Islandora-CLAW/chullo/statuses/{sha}","languages_url":"https://api.github.com/repos/Islandora-CLAW/chullo/languages","stargazers_url":"https://api.github.com/repos/Islandora-CLAW/chullo/stargazers","contributors_url":"https://api.github.com/repos/Islandora-CLAW/chullo/contributors","subscribers_url":"https://api.github.com/repos/Islandora-CLAW/chullo/subscribers","subscription_url":"https://api.github.com/repos/Islandora-CLAW/chullo/subscription","commits_url":"https://api.github.com/repos/Islandora-CLAW/chullo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Islandora-CLAW/chullo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Islandora-CLAW/chullo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Islandora-CLAW/chullo/contents/{+path}","compare_url":"https://api.github.com/repos/Islandora-CLAW/chullo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Islandora-CLAW/chullo/merges","archive_url":"https://api.github.com/repos/Islandora-CLAW/chullo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Islandora-CLAW/chullo/downloads","issues_url":"https://api.github.com/repos/Islandora-CLAW/chullo/issues{/number}","pulls_url":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls{/number}","milestones_url":"https://api.github.com/repos/Islandora-CLAW/chullo/milestones{/number}","notifications_url":"https://api.github.com/repos/Islandora-CLAW/chullo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Islandora-CLAW/chullo/labels{/name}","releases_url":"https://api.github.com/repos/Islandora-CLAW/chullo/releases{/id}","created_at":"2015-09-30T19:52:55Z","updated_at":"2015-11-05T20:35:19Z","pushed_at":"2015-12-16T17:33:00Z","git_url":"git://github.com/Islandora-CLAW/chullo.git","ssh_url":"git@github.com:Islandora-CLAW/chullo.git","clone_url":"https://github.com/Islandora-CLAW/chullo.git","svn_url":"https://github.com/Islandora-CLAW/chullo","homepage":null,"size":0,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30"},"html":{"href":"https://github.com/Islandora-CLAW/chullo/pull/30"},"issue":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/30"},"comments":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/Islandora-CLAW/chullo/statuses/f8a03d7cd4bff0712c4e5e925d70108d03d17829"}}}}