{"action":"created","comment":{"url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/comments/214042193","pull_request_review_id":151006131,"id":214042193,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDA0MjE5Mw==","diff_hunk":"@@ -1,69 +1,57 @@\n+import React, {Component} from 'react';\n+import ReactDOM from 'react-dom';\n \n-export const getTimeline = () => {\n+export const renderedTimeline = (rawData) => {\t\t\n+\tlet rawTimelineData = React.createElement('div', null, rawData);\n+\tconst monthNames = [\"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"Aug\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"];\n+\n+\tlet timelineArray = [];\n+\tfor(let i in rawData) {\n+\t\tlet tweetObj = rawData[i];\n+\t\tlet date = new Date(tweetObj.createdAt);\n+\t\tlet dateString = monthNames[date.getMonth()] + \" \" + date.getDate();\n+\t\tlet leftColumn = React.createElement('div', {className: 'leftColumn'}, [\n+\t\t\t\tReact.createElement('div', {className: 'userName'}, tweetObj.userName),\n+\t\t\t\tReact.createElement('div', {className: 'twitterHandle'}, tweetObj.twitterHandle),\n+\t\t\t\tReact.createElement('img', {className: 'image', src: tweetObj.profileImageUrl}, )\n+\t\t\t]);\n+\t\tlet rightColumn = React.createElement('div', {className: 'rightColumn'}, [\n+\t\t\t\tReact.createElement('div', {className: 'dateBlock'}, dateString),\n+\t\t\t\tReact.createElement('a', {target: '_blank', href: \"https://twitter.com/\" + tweetObj.twitterHandle + \"/status/\" + tweetObj.statusId}, tweetObj.message)\n+\t\t\t]);\n+\t\tif(i % 2 == 1) {\n+\t\t\ttimelineArray.push(React.createElement('div', {className: 'tweet', style: {backgroundColor: \"#e8f5fd\"}}, [leftColumn, rightColumn]));\n+\t\t}\n+\t\telse {\n+\t\t\ttimelineArray.push(React.createElement('div', {className: 'tweet', style: {backgroundColor: \"#e9e9e9\"}}, [leftColumn, rightColumn]));\n+\t\t}\n+\t\n+\t}\n+\treturn timelineArray;\n+\n+}\n+\n+export const timelineButton = (rawData) => {\n+\treturn React.createElement('button', {className: 'timelineButton', onClick: rawData}, 'Get Timeline')\n+}; \n+\n+export const httpRequest = (callback) => {\n \tlet xhttp = new XMLHttpRequest();\n \tlet URL = \"http://localhost:8080/api/1.0/twitter/timeline\";\n \txhttp.onreadystatechange = () => {\n+\t\n \t\tif(xhttp.readyState == XMLHttpRequest.DONE && xhttp.status == 200){\n-\t\t\trenderTimeline(JSON.parse(xhttp.responseText));\n+\t\t\tcallback(JSON.parse(xhttp.responseText));","path":"src/js/timeline.js","position":46,"original_position":46,"commit_id":"d49c7ba94794de9701f58bf977ec22d1e559a22c","original_commit_id":"d49c7ba94794de9701f58bf977ec22d1e559a22c","user":{"login":"kev-chan","id":3891797,"node_id":"MDQ6VXNlcjM4OTE3OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3891797?v=4","gravatar_id":"","url":"https://api.github.com/users/kev-chan","html_url":"https://github.com/kev-chan","followers_url":"https://api.github.com/users/kev-chan/followers","following_url":"https://api.github.com/users/kev-chan/following{/other_user}","gists_url":"https://api.github.com/users/kev-chan/gists{/gist_id}","starred_url":"https://api.github.com/users/kev-chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kev-chan/subscriptions","organizations_url":"https://api.github.com/users/kev-chan/orgs","repos_url":"https://api.github.com/users/kev-chan/repos","events_url":"https://api.github.com/users/kev-chan/events{/privacy}","received_events_url":"https://api.github.com/users/kev-chan/received_events","type":"User","site_admin":false},"body":"cool this works","created_at":"2018-08-30T13:59:45Z","updated_at":"2018-08-30T13:59:52Z","html_url":"https://github.com/JACornelius/onboarding-ui/pull/9#discussion_r214042193","pull_request_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/comments/214042193"},"html":{"href":"https://github.com/JACornelius/onboarding-ui/pull/9#discussion_r214042193"},"pull_request":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9","id":211559366,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTU5MzY2","html_url":"https://github.com/JACornelius/onboarding-ui/pull/9","diff_url":"https://github.com/JACornelius/onboarding-ui/pull/9.diff","patch_url":"https://github.com/JACornelius/onboarding-ui/pull/9.patch","issue_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/9","number":9,"state":"open","locked":false,"title":"React","user":{"login":"JACornelius","id":15059121,"node_id":"MDQ6VXNlcjE1MDU5MTIx","avatar_url":"https://avatars2.githubusercontent.com/u/15059121?v=4","gravatar_id":"","url":"https://api.github.com/users/JACornelius","html_url":"https://github.com/JACornelius","followers_url":"https://api.github.com/users/JACornelius/followers","following_url":"https://api.github.com/users/JACornelius/following{/other_user}","gists_url":"https://api.github.com/users/JACornelius/gists{/gist_id}","starred_url":"https://api.github.com/users/JACornelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JACornelius/subscriptions","organizations_url":"https://api.github.com/users/JACornelius/orgs","repos_url":"https://api.github.com/users/JACornelius/repos","events_url":"https://api.github.com/users/JACornelius/events{/privacy}","received_events_url":"https://api.github.com/users/JACornelius/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-28T21:11:03Z","updated_at":"2018-08-30T13:59:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81fbb30ccc1a28ab3faa86a583e05bc357355cb2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9/commits","review_comments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9/comments","review_comment_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/9/comments","statuses_url":"https://api.github.com/repos/JACornelius/onboarding-ui/statuses/d49c7ba94794de9701f58bf977ec22d1e559a22c","head":{"label":"JACornelius:react","ref":"react","sha":"d49c7ba94794de9701f58bf977ec22d1e559a22c","user":{"login":"JACornelius","id":15059121,"node_id":"MDQ6VXNlcjE1MDU5MTIx","avatar_url":"https://avatars2.githubusercontent.com/u/15059121?v=4","gravatar_id":"","url":"https://api.github.com/users/JACornelius","html_url":"https://github.com/JACornelius","followers_url":"https://api.github.com/users/JACornelius/followers","following_url":"https://api.github.com/users/JACornelius/following{/other_user}","gists_url":"https://api.github.com/users/JACornelius/gists{/gist_id}","starred_url":"https://api.github.com/users/JACornelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JACornelius/subscriptions","organizations_url":"https://api.github.com/users/JACornelius/orgs","repos_url":"https://api.github.com/users/JACornelius/repos","events_url":"https://api.github.com/users/JACornelius/events{/privacy}","received_events_url":"https://api.github.com/users/JACornelius/received_events","type":"User","site_admin":false},"repo":{"id":144631724,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ2MzE3MjQ=","name":"onboarding-ui","full_name":"JACornelius/onboarding-ui","owner":{"login":"JACornelius","id":15059121,"node_id":"MDQ6VXNlcjE1MDU5MTIx","avatar_url":"https://avatars2.githubusercontent.com/u/15059121?v=4","gravatar_id":"","url":"https://api.github.com/users/JACornelius","html_url":"https://github.com/JACornelius","followers_url":"https://api.github.com/users/JACornelius/followers","following_url":"https://api.github.com/users/JACornelius/following{/other_user}","gists_url":"https://api.github.com/users/JACornelius/gists{/gist_id}","starred_url":"https://api.github.com/users/JACornelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JACornelius/subscriptions","organizations_url":"https://api.github.com/users/JACornelius/orgs","repos_url":"https://api.github.com/users/JACornelius/repos","events_url":"https://api.github.com/users/JACornelius/events{/privacy}","received_events_url":"https://api.github.com/users/JACornelius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JACornelius/onboarding-ui","description":null,"fork":false,"url":"https://api.github.com/repos/JACornelius/onboarding-ui","forks_url":"https://api.github.com/repos/JACornelius/onboarding-ui/forks","keys_url":"https://api.github.com/repos/JACornelius/onboarding-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JACornelius/onboarding-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JACornelius/onboarding-ui/teams","hooks_url":"https://api.github.com/repos/JACornelius/onboarding-ui/hooks","issue_events_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/events{/number}","events_url":"https://api.github.com/repos/JACornelius/onboarding-ui/events","assignees_url":"https://api.github.com/repos/JACornelius/onboarding-ui/assignees{/user}","branches_url":"https://api.github.com/repos/JACornelius/onboarding-ui/branches{/branch}","tags_url":"https://api.github.com/repos/JACornelius/onboarding-ui/tags","blobs_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JACornelius/onboarding-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/JACornelius/onboarding-ui/languages","stargazers_url":"https://api.github.com/repos/JACornelius/onboarding-ui/stargazers","contributors_url":"https://api.github.com/repos/JACornelius/onboarding-ui/contributors","subscribers_url":"https://api.github.com/repos/JACornelius/onboarding-ui/subscribers","subscription_url":"https://api.github.com/repos/JACornelius/onboarding-ui/subscription","commits_url":"https://api.github.com/repos/JACornelius/onboarding-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/JACornelius/onboarding-ui/contents/{+path}","compare_url":"https://api.github.com/repos/JACornelius/onboarding-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JACornelius/onboarding-ui/merges","archive_url":"https://api.github.com/repos/JACornelius/onboarding-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JACornelius/onboarding-ui/downloads","issues_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues{/number}","pulls_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/JACornelius/onboarding-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/JACornelius/onboarding-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JACornelius/onboarding-ui/labels{/name}","releases_url":"https://api.github.com/repos/JACornelius/onboarding-ui/releases{/id}","deployments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/deployments","created_at":"2018-08-13T20:43:00Z","updated_at":"2018-08-27T16:34:19Z","pushed_at":"2018-08-30T03:32:24Z","git_url":"git://github.com/JACornelius/onboarding-ui.git","ssh_url":"git@github.com:JACornelius/onboarding-ui.git","clone_url":"https://github.com/JACornelius/onboarding-ui.git","svn_url":"https://github.com/JACornelius/onboarding-ui","homepage":null,"size":1739,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"JACornelius:master","ref":"master","sha":"f892e49047104c0bab777353bcb3d53b8f3cfb1f","user":{"login":"JACornelius","id":15059121,"node_id":"MDQ6VXNlcjE1MDU5MTIx","avatar_url":"https://avatars2.githubusercontent.com/u/15059121?v=4","gravatar_id":"","url":"https://api.github.com/users/JACornelius","html_url":"https://github.com/JACornelius","followers_url":"https://api.github.com/users/JACornelius/followers","following_url":"https://api.github.com/users/JACornelius/following{/other_user}","gists_url":"https://api.github.com/users/JACornelius/gists{/gist_id}","starred_url":"https://api.github.com/users/JACornelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JACornelius/subscriptions","organizations_url":"https://api.github.com/users/JACornelius/orgs","repos_url":"https://api.github.com/users/JACornelius/repos","events_url":"https://api.github.com/users/JACornelius/events{/privacy}","received_events_url":"https://api.github.com/users/JACornelius/received_events","type":"User","site_admin":false},"repo":{"id":144631724,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ2MzE3MjQ=","name":"onboarding-ui","full_name":"JACornelius/onboarding-ui","owner":{"login":"JACornelius","id":15059121,"node_id":"MDQ6VXNlcjE1MDU5MTIx","avatar_url":"https://avatars2.githubusercontent.com/u/15059121?v=4","gravatar_id":"","url":"https://api.github.com/users/JACornelius","html_url":"https://github.com/JACornelius","followers_url":"https://api.github.com/users/JACornelius/followers","following_url":"https://api.github.com/users/JACornelius/following{/other_user}","gists_url":"https://api.github.com/users/JACornelius/gists{/gist_id}","starred_url":"https://api.github.com/users/JACornelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JACornelius/subscriptions","organizations_url":"https://api.github.com/users/JACornelius/orgs","repos_url":"https://api.github.com/users/JACornelius/repos","events_url":"https://api.github.com/users/JACornelius/events{/privacy}","received_events_url":"https://api.github.com/users/JACornelius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JACornelius/onboarding-ui","description":null,"fork":false,"url":"https://api.github.com/repos/JACornelius/onboarding-ui","forks_url":"https://api.github.com/repos/JACornelius/onboarding-ui/forks","keys_url":"https://api.github.com/repos/JACornelius/onboarding-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JACornelius/onboarding-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JACornelius/onboarding-ui/teams","hooks_url":"https://api.github.com/repos/JACornelius/onboarding-ui/hooks","issue_events_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/events{/number}","events_url":"https://api.github.com/repos/JACornelius/onboarding-ui/events","assignees_url":"https://api.github.com/repos/JACornelius/onboarding-ui/assignees{/user}","branches_url":"https://api.github.com/repos/JACornelius/onboarding-ui/branches{/branch}","tags_url":"https://api.github.com/repos/JACornelius/onboarding-ui/tags","blobs_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JACornelius/onboarding-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/JACornelius/onboarding-ui/languages","stargazers_url":"https://api.github.com/repos/JACornelius/onboarding-ui/stargazers","contributors_url":"https://api.github.com/repos/JACornelius/onboarding-ui/contributors","subscribers_url":"https://api.github.com/repos/JACornelius/onboarding-ui/subscribers","subscription_url":"https://api.github.com/repos/JACornelius/onboarding-ui/subscription","commits_url":"https://api.github.com/repos/JACornelius/onboarding-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/JACornelius/onboarding-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/JACornelius/onboarding-ui/contents/{+path}","compare_url":"https://api.github.com/repos/JACornelius/onboarding-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JACornelius/onboarding-ui/merges","archive_url":"https://api.github.com/repos/JACornelius/onboarding-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JACornelius/onboarding-ui/downloads","issues_url":"https://api.github.com/repos/JACornelius/onboarding-ui/issues{/number}","pulls_url":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/JACornelius/onboarding-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/JACornelius/onboarding-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JACornelius/onboarding-ui/labels{/name}","releases_url":"https://api.github.com/repos/JACornelius/onboarding-ui/releases{/id}","deployments_url":"https://api.github.com/repos/JACornelius/onboarding-ui/deployments","created_at":"2018-08-13T20:43:00Z","updated_at":"2018-08-27T16:34:19Z","pushed_at":"2018-08-30T03:32:24Z","git_url":"git://github.com/JACornelius/onboarding-ui.git","ssh_url":"git@github.com:JACornelius/onboarding-ui.git","clone_url":"https://github.com/JACornelius/onboarding-ui.git","svn_url":"https://github.com/JACornelius/onboarding-ui","homepage":null,"size":1739,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9"},"html":{"href":"https://github.com/JACornelius/onboarding-ui/pull/9"},"issue":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/9"},"comments":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/JACornelius/onboarding-ui/statuses/d49c7ba94794de9701f58bf977ec22d1e559a22c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kev-chan"}}