{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/comments/55381811","id":55381811,"diff_hunk":"@@ -0,0 +1,38 @@\n+'use strict';\n+\n+const cache = require('../lib/cache');\n+\n+// Accepts a keen-io API URL.\n+// Example: /keen-cache/3.0/projects/{project ID}/queries/count_unique?api_key={API key}\n+module.exports = (req, res, next) => {\n+\tcache.init();\n+\n+\tlet keenURL = req.originalUrl\n+\t\t.replace(/https:\\/\\/api\\.keen\\.io\\//i, '')","path":"server/controllers/keen-cache.js","position":11,"original_position":11,"commit_id":"a37dfa6b65f5d716348c01f6c0fcfcaf7904d8a8","original_commit_id":"a37dfa6b65f5d716348c01f6c0fcfcaf7904d8a8","user":{"login":"wheresrhys","id":447559,"avatar_url":"https://avatars.githubusercontent.com/u/447559?v=3","gravatar_id":"","url":"https://api.github.com/users/wheresrhys","html_url":"https://github.com/wheresrhys","followers_url":"https://api.github.com/users/wheresrhys/followers","following_url":"https://api.github.com/users/wheresrhys/following{/other_user}","gists_url":"https://api.github.com/users/wheresrhys/gists{/gist_id}","starred_url":"https://api.github.com/users/wheresrhys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheresrhys/subscriptions","organizations_url":"https://api.github.com/users/wheresrhys/orgs","repos_url":"https://api.github.com/users/wheresrhys/repos","events_url":"https://api.github.com/users/wheresrhys/events{/privacy}","received_events_url":"https://api.github.com/users/wheresrhys/received_events","type":"User","site_admin":false},"body":"Is this line needed?","created_at":"2016-03-08T16:11:49Z","updated_at":"2016-03-08T16:11:49Z","html_url":"https://github.com/Financial-Times/next-beacon-v2/pull/123#discussion_r55381811","pull_request_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/comments/55381811"},"html":{"href":"https://github.com/Financial-Times/next-beacon-v2/pull/123#discussion_r55381811"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123","id":61956169,"html_url":"https://github.com/Financial-Times/next-beacon-v2/pull/123","diff_url":"https://github.com/Financial-Times/next-beacon-v2/pull/123.diff","patch_url":"https://github.com/Financial-Times/next-beacon-v2/pull/123.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/123","number":123,"state":"open","locked":false,"title":"Initial controller for keen API response caching","user":{"login":"adambraimbridge","id":224547,"avatar_url":"https://avatars.githubusercontent.com/u/224547?v=3","gravatar_id":"","url":"https://api.github.com/users/adambraimbridge","html_url":"https://github.com/adambraimbridge","followers_url":"https://api.github.com/users/adambraimbridge/followers","following_url":"https://api.github.com/users/adambraimbridge/following{/other_user}","gists_url":"https://api.github.com/users/adambraimbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/adambraimbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adambraimbridge/subscriptions","organizations_url":"https://api.github.com/users/adambraimbridge/orgs","repos_url":"https://api.github.com/users/adambraimbridge/repos","events_url":"https://api.github.com/users/adambraimbridge/events{/privacy}","received_events_url":"https://api.github.com/users/adambraimbridge/received_events","type":"User","site_admin":false},"body":"cc @wheresrhys is this in the same direction you had in mind?","created_at":"2016-03-07T18:08:13Z","updated_at":"2016-03-08T16:11:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91059dbfadab809e6c5fd11669d9186bf89000e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/123/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/statuses/a37dfa6b65f5d716348c01f6c0fcfcaf7904d8a8","head":{"label":"Financial-Times:keen-cache","ref":"keen-cache","sha":"a37dfa6b65f5d716348c01f6c0fcfcaf7904d8a8","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":48106386,"name":"next-beacon-v2","full_name":"Financial-Times/next-beacon-v2","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-beacon-v2","description":"Version 2 of next's realtime stats dashboards","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-beacon-v2","forks_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/deployments","created_at":"2015-12-16T11:26:05Z","updated_at":"2016-01-22T18:19:12Z","pushed_at":"2016-03-08T16:04:17Z","git_url":"git://github.com/Financial-Times/next-beacon-v2.git","ssh_url":"git@github.com:Financial-Times/next-beacon-v2.git","clone_url":"https://github.com/Financial-Times/next-beacon-v2.git","svn_url":"https://github.com/Financial-Times/next-beacon-v2","homepage":null,"size":449,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"15f729e0ad2a1bcdd60a9b8648a945219af5e55a","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":48106386,"name":"next-beacon-v2","full_name":"Financial-Times/next-beacon-v2","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-beacon-v2","description":"Version 2 of next's realtime stats dashboards","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-beacon-v2","forks_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-beacon-v2/deployments","created_at":"2015-12-16T11:26:05Z","updated_at":"2016-01-22T18:19:12Z","pushed_at":"2016-03-08T16:04:17Z","git_url":"git://github.com/Financial-Times/next-beacon-v2.git","ssh_url":"git@github.com:Financial-Times/next-beacon-v2.git","clone_url":"https://github.com/Financial-Times/next-beacon-v2.git","svn_url":"https://github.com/Financial-Times/next-beacon-v2","homepage":null,"size":449,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123"},"html":{"href":"https://github.com/Financial-Times/next-beacon-v2/pull/123"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/123"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-beacon-v2/statuses/a37dfa6b65f5d716348c01f6c0fcfcaf7904d8a8"}}}}