{"action":"created","comment":{"url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/comments/47226631","id":47226631,"diff_hunk":"@@ -0,0 +1,105 @@\n+<?php\n+\n+namespace App\\Http\\Controllers;\n+\n+use GuzzleHttp\\Client;\n+use Illuminate\\Http\\Request;\n+use App\\Repositories\\ApiRepository;\n+\n+class ApiController extends Controller {\n+\n+    /**\n+     * Extracts api data from request and sends it to the repository\n+     *\n+     * @param Request $request\n+     *\n+     * @return Response\n+     */\n+    public function saveRemoteApi(Request $request) {\n+        return ApiRepository::save(\n+            $request->input('index'),\n+            $request->input('type'),\n+            $request->input('url')\n+        );\n+    }\n+\n+    /**\n+     * Test a remote API, by calling it and then return the result\n+     *\n+     * @param string $apiUrl\n+     *\n+     * @return Response\n+     */\n+    public function testRemoteApi($apiUrl) {\n+        return $this->callRemoteApi($apiUrl);\n+    }\n+\n+    /**\n+     * Return test data with date represented as a year\n+     *\n+     * @return Response\n+     */\n+    public function testYear() {\n+        $yearTestData = ['date' => '2011', 'user_searches' => 100];\n+\n+        return response()->json($yearTestData);\n+    }\n+\n+    /**\n+     * Return test data with date represented as a month\n+     *\n+     * @return Response\n+     */\n+    public function testMonth() {\n+        $monthTestData = ['date' => '2011-07', 'user_searches' => 15];","path":"app/Http/Controllers/ApiController.php","position":54,"original_position":54,"commit_id":"5a532ab6f22a1e00dd6f1c591dad5001624a6d79","original_commit_id":"5a532ab6f22a1e00dd6f1c591dad5001624a6d79","user":{"login":"ckr123","id":5929074,"avatar_url":"https://avatars.githubusercontent.com/u/5929074?v=3","gravatar_id":"","url":"https://api.github.com/users/ckr123","html_url":"https://github.com/ckr123","followers_url":"https://api.github.com/users/ckr123/followers","following_url":"https://api.github.com/users/ckr123/following{/other_user}","gists_url":"https://api.github.com/users/ckr123/gists{/gist_id}","starred_url":"https://api.github.com/users/ckr123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckr123/subscriptions","organizations_url":"https://api.github.com/users/ckr123/orgs","repos_url":"https://api.github.com/users/ckr123/repos","events_url":"https://api.github.com/users/ckr123/events{/privacy}","received_events_url":"https://api.github.com/users/ckr123/received_events","type":"User","site_admin":false},"body":"samme her","created_at":"2015-12-10T13:43:55Z","updated_at":"2015-12-10T13:43:55Z","html_url":"https://github.com/ckr123/Hovedopgave/pull/41#discussion_r47226631","pull_request_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/comments/47226631"},"html":{"href":"https://github.com/ckr123/Hovedopgave/pull/41#discussion_r47226631"},"pull_request":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41","id":53230411,"html_url":"https://github.com/ckr123/Hovedopgave/pull/41","diff_url":"https://github.com/ckr123/Hovedopgave/pull/41.diff","patch_url":"https://github.com/ckr123/Hovedopgave/pull/41.patch","issue_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/41","number":41,"state":"open","locked":false,"title":"Upload data","user":{"login":"Munk91","id":5628524,"avatar_url":"https://avatars.githubusercontent.com/u/5628524?v=3","gravatar_id":"","url":"https://api.github.com/users/Munk91","html_url":"https://github.com/Munk91","followers_url":"https://api.github.com/users/Munk91/followers","following_url":"https://api.github.com/users/Munk91/following{/other_user}","gists_url":"https://api.github.com/users/Munk91/gists{/gist_id}","starred_url":"https://api.github.com/users/Munk91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Munk91/subscriptions","organizations_url":"https://api.github.com/users/Munk91/orgs","repos_url":"https://api.github.com/users/Munk91/repos","events_url":"https://api.github.com/users/Munk91/events{/privacy}","received_events_url":"https://api.github.com/users/Munk91/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-10T08:54:23Z","updated_at":"2015-12-10T13:43:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae6c7e0d748c07f67cf4ca6d9d2bf5d391c260b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41/commits","review_comments_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41/comments","review_comment_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/41/comments","statuses_url":"https://api.github.com/repos/ckr123/Hovedopgave/statuses/5a532ab6f22a1e00dd6f1c591dad5001624a6d79","head":{"label":"ckr123:feat-upload-data","ref":"feat-upload-data","sha":"5a532ab6f22a1e00dd6f1c591dad5001624a6d79","user":{"login":"ckr123","id":5929074,"avatar_url":"https://avatars.githubusercontent.com/u/5929074?v=3","gravatar_id":"","url":"https://api.github.com/users/ckr123","html_url":"https://github.com/ckr123","followers_url":"https://api.github.com/users/ckr123/followers","following_url":"https://api.github.com/users/ckr123/following{/other_user}","gists_url":"https://api.github.com/users/ckr123/gists{/gist_id}","starred_url":"https://api.github.com/users/ckr123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckr123/subscriptions","organizations_url":"https://api.github.com/users/ckr123/orgs","repos_url":"https://api.github.com/users/ckr123/repos","events_url":"https://api.github.com/users/ckr123/events{/privacy}","received_events_url":"https://api.github.com/users/ckr123/received_events","type":"User","site_admin":false},"repo":{"id":45062896,"name":"Hovedopgave","full_name":"ckr123/Hovedopgave","owner":{"login":"ckr123","id":5929074,"avatar_url":"https://avatars.githubusercontent.com/u/5929074?v=3","gravatar_id":"","url":"https://api.github.com/users/ckr123","html_url":"https://github.com/ckr123","followers_url":"https://api.github.com/users/ckr123/followers","following_url":"https://api.github.com/users/ckr123/following{/other_user}","gists_url":"https://api.github.com/users/ckr123/gists{/gist_id}","starred_url":"https://api.github.com/users/ckr123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckr123/subscriptions","organizations_url":"https://api.github.com/users/ckr123/orgs","repos_url":"https://api.github.com/users/ckr123/repos","events_url":"https://api.github.com/users/ckr123/events{/privacy}","received_events_url":"https://api.github.com/users/ckr123/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ckr123/Hovedopgave","description":"","fork":false,"url":"https://api.github.com/repos/ckr123/Hovedopgave","forks_url":"https://api.github.com/repos/ckr123/Hovedopgave/forks","keys_url":"https://api.github.com/repos/ckr123/Hovedopgave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckr123/Hovedopgave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckr123/Hovedopgave/teams","hooks_url":"https://api.github.com/repos/ckr123/Hovedopgave/hooks","issue_events_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/events{/number}","events_url":"https://api.github.com/repos/ckr123/Hovedopgave/events","assignees_url":"https://api.github.com/repos/ckr123/Hovedopgave/assignees{/user}","branches_url":"https://api.github.com/repos/ckr123/Hovedopgave/branches{/branch}","tags_url":"https://api.github.com/repos/ckr123/Hovedopgave/tags","blobs_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckr123/Hovedopgave/statuses/{sha}","languages_url":"https://api.github.com/repos/ckr123/Hovedopgave/languages","stargazers_url":"https://api.github.com/repos/ckr123/Hovedopgave/stargazers","contributors_url":"https://api.github.com/repos/ckr123/Hovedopgave/contributors","subscribers_url":"https://api.github.com/repos/ckr123/Hovedopgave/subscribers","subscription_url":"https://api.github.com/repos/ckr123/Hovedopgave/subscription","commits_url":"https://api.github.com/repos/ckr123/Hovedopgave/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckr123/Hovedopgave/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckr123/Hovedopgave/contents/{+path}","compare_url":"https://api.github.com/repos/ckr123/Hovedopgave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckr123/Hovedopgave/merges","archive_url":"https://api.github.com/repos/ckr123/Hovedopgave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckr123/Hovedopgave/downloads","issues_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues{/number}","pulls_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls{/number}","milestones_url":"https://api.github.com/repos/ckr123/Hovedopgave/milestones{/number}","notifications_url":"https://api.github.com/repos/ckr123/Hovedopgave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckr123/Hovedopgave/labels{/name}","releases_url":"https://api.github.com/repos/ckr123/Hovedopgave/releases{/id}","created_at":"2015-10-27T18:54:01Z","updated_at":"2015-11-04T13:30:51Z","pushed_at":"2015-12-10T12:53:11Z","git_url":"git://github.com/ckr123/Hovedopgave.git","ssh_url":"git@github.com:ckr123/Hovedopgave.git","clone_url":"https://github.com/ckr123/Hovedopgave.git","svn_url":"https://github.com/ckr123/Hovedopgave","homepage":null,"size":44098,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"ckr123:master","ref":"master","sha":"ae9610dec592f4e1a1b65d444ddb2a0b42e8de9b","user":{"login":"ckr123","id":5929074,"avatar_url":"https://avatars.githubusercontent.com/u/5929074?v=3","gravatar_id":"","url":"https://api.github.com/users/ckr123","html_url":"https://github.com/ckr123","followers_url":"https://api.github.com/users/ckr123/followers","following_url":"https://api.github.com/users/ckr123/following{/other_user}","gists_url":"https://api.github.com/users/ckr123/gists{/gist_id}","starred_url":"https://api.github.com/users/ckr123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckr123/subscriptions","organizations_url":"https://api.github.com/users/ckr123/orgs","repos_url":"https://api.github.com/users/ckr123/repos","events_url":"https://api.github.com/users/ckr123/events{/privacy}","received_events_url":"https://api.github.com/users/ckr123/received_events","type":"User","site_admin":false},"repo":{"id":45062896,"name":"Hovedopgave","full_name":"ckr123/Hovedopgave","owner":{"login":"ckr123","id":5929074,"avatar_url":"https://avatars.githubusercontent.com/u/5929074?v=3","gravatar_id":"","url":"https://api.github.com/users/ckr123","html_url":"https://github.com/ckr123","followers_url":"https://api.github.com/users/ckr123/followers","following_url":"https://api.github.com/users/ckr123/following{/other_user}","gists_url":"https://api.github.com/users/ckr123/gists{/gist_id}","starred_url":"https://api.github.com/users/ckr123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckr123/subscriptions","organizations_url":"https://api.github.com/users/ckr123/orgs","repos_url":"https://api.github.com/users/ckr123/repos","events_url":"https://api.github.com/users/ckr123/events{/privacy}","received_events_url":"https://api.github.com/users/ckr123/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ckr123/Hovedopgave","description":"","fork":false,"url":"https://api.github.com/repos/ckr123/Hovedopgave","forks_url":"https://api.github.com/repos/ckr123/Hovedopgave/forks","keys_url":"https://api.github.com/repos/ckr123/Hovedopgave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckr123/Hovedopgave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckr123/Hovedopgave/teams","hooks_url":"https://api.github.com/repos/ckr123/Hovedopgave/hooks","issue_events_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/events{/number}","events_url":"https://api.github.com/repos/ckr123/Hovedopgave/events","assignees_url":"https://api.github.com/repos/ckr123/Hovedopgave/assignees{/user}","branches_url":"https://api.github.com/repos/ckr123/Hovedopgave/branches{/branch}","tags_url":"https://api.github.com/repos/ckr123/Hovedopgave/tags","blobs_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckr123/Hovedopgave/statuses/{sha}","languages_url":"https://api.github.com/repos/ckr123/Hovedopgave/languages","stargazers_url":"https://api.github.com/repos/ckr123/Hovedopgave/stargazers","contributors_url":"https://api.github.com/repos/ckr123/Hovedopgave/contributors","subscribers_url":"https://api.github.com/repos/ckr123/Hovedopgave/subscribers","subscription_url":"https://api.github.com/repos/ckr123/Hovedopgave/subscription","commits_url":"https://api.github.com/repos/ckr123/Hovedopgave/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckr123/Hovedopgave/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckr123/Hovedopgave/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckr123/Hovedopgave/contents/{+path}","compare_url":"https://api.github.com/repos/ckr123/Hovedopgave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckr123/Hovedopgave/merges","archive_url":"https://api.github.com/repos/ckr123/Hovedopgave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckr123/Hovedopgave/downloads","issues_url":"https://api.github.com/repos/ckr123/Hovedopgave/issues{/number}","pulls_url":"https://api.github.com/repos/ckr123/Hovedopgave/pulls{/number}","milestones_url":"https://api.github.com/repos/ckr123/Hovedopgave/milestones{/number}","notifications_url":"https://api.github.com/repos/ckr123/Hovedopgave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckr123/Hovedopgave/labels{/name}","releases_url":"https://api.github.com/repos/ckr123/Hovedopgave/releases{/id}","created_at":"2015-10-27T18:54:01Z","updated_at":"2015-11-04T13:30:51Z","pushed_at":"2015-12-10T12:53:11Z","git_url":"git://github.com/ckr123/Hovedopgave.git","ssh_url":"git@github.com:ckr123/Hovedopgave.git","clone_url":"https://github.com/ckr123/Hovedopgave.git","svn_url":"https://github.com/ckr123/Hovedopgave","homepage":null,"size":44098,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41"},"html":{"href":"https://github.com/ckr123/Hovedopgave/pull/41"},"issue":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/issues/41"},"comments":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/ckr123/Hovedopgave/statuses/5a532ab6f22a1e00dd6f1c591dad5001624a6d79"}}}}