{"action":"created","comment":{"url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/comments/67603688","id":67603688,"diff_hunk":"@@ -0,0 +1,103 @@\n+var React = require('react');\n+var transparentBg = require('../styles/index.js').transparentBg;\n+var ReactRouter = require('react-router');\n+var Link = ReactRouter.Link;\n+\n+var BarPage = React.createClass({\n+\n+  getInitialState: function () {\n+    return {\n+      barArray: [],\n+      firstBar: '',\n+      lat: 0,\n+      lng: 0,\n+    };\n+  },\n+\n+  componentDidMount: function () {\n+\n+    var googleURL = 'https://www.googleapis.com/geolocation/v1/geolocate?key=';\n+    googleURL += 'AIzaSyBYTqKvFfX5oAQOVFL8G7dcY26H8-nNU9Q';\n+\n+    $.post(googleURL, {},\n+      function (googleData) {\n+        this.setState({\n+            lat: googleData.location.lat,\n+            lng: googleData.location.lng,\n+          });\n+        var url = 'https://api.foursquare.com/v2/venues/search?';\n+\n+        //App Stuff\n+        url += 'client_id=302XBJMGHNZG4CRCPB2HXC51JP35LIDFM35FAQPIJ5U0MOKG';\n+        url += '&client_secret=PJLEIJHCFSAGOPRHJBYMXNEH322WCKZB2HTCLJPVYR0PZVVY';\n+        url += '&v=20160609';\n+\n+        //Parameters for 'near' and 'restaurant'\n+        url += '&ll=';\n+        url += this.state.lat + ',' + this.state.lng;\n+        url += '&query=bar,restaurant';\n+        url += '&limit=50';\n+        url += '&radius=1000';\n+\n+        $.getJSON(url,\n+          function (data) {\n+            var tempBarArray = [];\n+            var tempFirstBar = {};\n+\n+            $.each(data.response.venues, function (i, venues) {\n+                  name = venues.name;\n+                  distance = venues.location.distance;\n+                  tempBarArray.push({\n+                    name: name,\n+                    distance: distance,\n+                    firstAddress: venues.location.formattedAddress[0],\n+                    secondAddress: venues.location.formattedAddress[1],\n+                  });\n+\n+                });\n+\n+            tempBarArray.sort(function (bar1, bar2) {\n+              return bar1.distance - bar2.distance;\n+            });\n+\n+            tempFirstBar = tempBarArray[0];\n+            tempBarArray.shift();\n+\n+            this.setState({\n+                  barArray: tempBarArray,\n+                  firstBar: tempFirstBar,\n+                });\n+\n+          }.bind(this));\n+      }.bind(this));\n+\n+  },\n+\n+  printBars: function () {\n+    return this.state.barArray.map(function (name, index) {\n+      //console.log({name});\n+      return <p key={index}>{name.name}</p>;\n+    });\n+  },\n+\n+  render: function () {\n+\n+    return (\n+      <div>\n+        <Link to='/'>\n+        <button type='button' className='btn btn-secondary col-sm-2' > Home </button>\n+        </Link>\n+      <div className='jumbotron col-sm-12 text-center' style={transparentBg}>\n+        <h1> <b>Nearest Bar</b> </h1>\n+        <h3> <i>{this.state.firstBar.name} </i></h3>\n+\n+        <h5> {this.state.firstBar.secondAddress}</h5>\n+        <h3> <b>Other Nearby Bars </b></h3>","path":"app/containers/BarPage.js","position":95,"original_position":95,"commit_id":"a31e728ecead45f325b307a603a3b309e41caaa5","original_commit_id":"a31e728ecead45f325b307a603a3b309e41caaa5","user":{"login":"jack-ross","id":10081918,"avatar_url":"https://avatars.githubusercontent.com/u/10081918?v=3","gravatar_id":"","url":"https://api.github.com/users/jack-ross","html_url":"https://github.com/jack-ross","followers_url":"https://api.github.com/users/jack-ross/followers","following_url":"https://api.github.com/users/jack-ross/following{/other_user}","gists_url":"https://api.github.com/users/jack-ross/gists{/gist_id}","starred_url":"https://api.github.com/users/jack-ross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack-ross/subscriptions","organizations_url":"https://api.github.com/users/jack-ross/orgs","repos_url":"https://api.github.com/users/jack-ross/repos","events_url":"https://api.github.com/users/jack-ross/events{/privacy}","received_events_url":"https://api.github.com/users/jack-ross/received_events","type":"User","site_admin":false},"body":"formating between elements is inconsistent. maybe another package? :)","created_at":"2016-06-18T17:15:09Z","updated_at":"2016-06-18T17:15:09Z","html_url":"https://github.com/Portal-analytics/mixology-university/pull/5#discussion_r67603688","pull_request_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/comments/67603688"},"html":{"href":"https://github.com/Portal-analytics/mixology-university/pull/5#discussion_r67603688"},"pull_request":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5","id":74310337,"html_url":"https://github.com/Portal-analytics/mixology-university/pull/5","diff_url":"https://github.com/Portal-analytics/mixology-university/pull/5.diff","patch_url":"https://github.com/Portal-analytics/mixology-university/pull/5.patch","issue_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/5","number":5,"state":"open","locked":false,"title":"Feature/add page","user":{"login":"mattmcguin","id":18337895,"avatar_url":"https://avatars.githubusercontent.com/u/18337895?v=3","gravatar_id":"","url":"https://api.github.com/users/mattmcguin","html_url":"https://github.com/mattmcguin","followers_url":"https://api.github.com/users/mattmcguin/followers","following_url":"https://api.github.com/users/mattmcguin/following{/other_user}","gists_url":"https://api.github.com/users/mattmcguin/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmcguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmcguin/subscriptions","organizations_url":"https://api.github.com/users/mattmcguin/orgs","repos_url":"https://api.github.com/users/mattmcguin/repos","events_url":"https://api.github.com/users/mattmcguin/events{/privacy}","received_events_url":"https://api.github.com/users/mattmcguin/received_events","type":"User","site_admin":false},"body":"Finished Add/Delete/Edit","created_at":"2016-06-17T21:52:54Z","updated_at":"2016-06-18T17:15:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6934212e005df55329cedefce8db2acb97007617","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/5/comments","statuses_url":"https://api.github.com/repos/Portal-analytics/mixology-university/statuses/a31e728ecead45f325b307a603a3b309e41caaa5","head":{"label":"Portal-analytics:feature/AddPage","ref":"feature/AddPage","sha":"a31e728ecead45f325b307a603a3b309e41caaa5","user":{"login":"Portal-analytics","id":18541420,"avatar_url":"https://avatars.githubusercontent.com/u/18541420?v=3","gravatar_id":"","url":"https://api.github.com/users/Portal-analytics","html_url":"https://github.com/Portal-analytics","followers_url":"https://api.github.com/users/Portal-analytics/followers","following_url":"https://api.github.com/users/Portal-analytics/following{/other_user}","gists_url":"https://api.github.com/users/Portal-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Portal-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Portal-analytics/subscriptions","organizations_url":"https://api.github.com/users/Portal-analytics/orgs","repos_url":"https://api.github.com/users/Portal-analytics/repos","events_url":"https://api.github.com/users/Portal-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/Portal-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":60622474,"name":"mixology-university","full_name":"Portal-analytics/mixology-university","owner":{"login":"Portal-analytics","id":18541420,"avatar_url":"https://avatars.githubusercontent.com/u/18541420?v=3","gravatar_id":"","url":"https://api.github.com/users/Portal-analytics","html_url":"https://github.com/Portal-analytics","followers_url":"https://api.github.com/users/Portal-analytics/followers","following_url":"https://api.github.com/users/Portal-analytics/following{/other_user}","gists_url":"https://api.github.com/users/Portal-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Portal-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Portal-analytics/subscriptions","organizations_url":"https://api.github.com/users/Portal-analytics/orgs","repos_url":"https://api.github.com/users/Portal-analytics/repos","events_url":"https://api.github.com/users/Portal-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/Portal-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Portal-analytics/mixology-university","description":"Web Application that displays how to make cocktails and where the nearest bar is.","fork":false,"url":"https://api.github.com/repos/Portal-analytics/mixology-university","forks_url":"https://api.github.com/repos/Portal-analytics/mixology-university/forks","keys_url":"https://api.github.com/repos/Portal-analytics/mixology-university/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Portal-analytics/mixology-university/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Portal-analytics/mixology-university/teams","hooks_url":"https://api.github.com/repos/Portal-analytics/mixology-university/hooks","issue_events_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/events{/number}","events_url":"https://api.github.com/repos/Portal-analytics/mixology-university/events","assignees_url":"https://api.github.com/repos/Portal-analytics/mixology-university/assignees{/user}","branches_url":"https://api.github.com/repos/Portal-analytics/mixology-university/branches{/branch}","tags_url":"https://api.github.com/repos/Portal-analytics/mixology-university/tags","blobs_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/refs{/sha}","trees_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Portal-analytics/mixology-university/statuses/{sha}","languages_url":"https://api.github.com/repos/Portal-analytics/mixology-university/languages","stargazers_url":"https://api.github.com/repos/Portal-analytics/mixology-university/stargazers","contributors_url":"https://api.github.com/repos/Portal-analytics/mixology-university/contributors","subscribers_url":"https://api.github.com/repos/Portal-analytics/mixology-university/subscribers","subscription_url":"https://api.github.com/repos/Portal-analytics/mixology-university/subscription","commits_url":"https://api.github.com/repos/Portal-analytics/mixology-university/commits{/sha}","git_commits_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/commits{/sha}","comments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/comments{/number}","issue_comment_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/comments{/number}","contents_url":"https://api.github.com/repos/Portal-analytics/mixology-university/contents/{+path}","compare_url":"https://api.github.com/repos/Portal-analytics/mixology-university/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Portal-analytics/mixology-university/merges","archive_url":"https://api.github.com/repos/Portal-analytics/mixology-university/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Portal-analytics/mixology-university/downloads","issues_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues{/number}","pulls_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls{/number}","milestones_url":"https://api.github.com/repos/Portal-analytics/mixology-university/milestones{/number}","notifications_url":"https://api.github.com/repos/Portal-analytics/mixology-university/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Portal-analytics/mixology-university/labels{/name}","releases_url":"https://api.github.com/repos/Portal-analytics/mixology-university/releases{/id}","deployments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/deployments","created_at":"2016-06-07T15:01:03Z","updated_at":"2016-06-07T15:01:03Z","pushed_at":"2016-06-17T21:52:54Z","git_url":"git://github.com/Portal-analytics/mixology-university.git","ssh_url":"git@github.com:Portal-analytics/mixology-university.git","clone_url":"https://github.com/Portal-analytics/mixology-university.git","svn_url":"https://github.com/Portal-analytics/mixology-university","homepage":null,"size":161,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"develop"}},"base":{"label":"Portal-analytics:develop","ref":"develop","sha":"c3cc4dc48350325d2cabfe9fa3c8ac643ab28853","user":{"login":"Portal-analytics","id":18541420,"avatar_url":"https://avatars.githubusercontent.com/u/18541420?v=3","gravatar_id":"","url":"https://api.github.com/users/Portal-analytics","html_url":"https://github.com/Portal-analytics","followers_url":"https://api.github.com/users/Portal-analytics/followers","following_url":"https://api.github.com/users/Portal-analytics/following{/other_user}","gists_url":"https://api.github.com/users/Portal-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Portal-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Portal-analytics/subscriptions","organizations_url":"https://api.github.com/users/Portal-analytics/orgs","repos_url":"https://api.github.com/users/Portal-analytics/repos","events_url":"https://api.github.com/users/Portal-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/Portal-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":60622474,"name":"mixology-university","full_name":"Portal-analytics/mixology-university","owner":{"login":"Portal-analytics","id":18541420,"avatar_url":"https://avatars.githubusercontent.com/u/18541420?v=3","gravatar_id":"","url":"https://api.github.com/users/Portal-analytics","html_url":"https://github.com/Portal-analytics","followers_url":"https://api.github.com/users/Portal-analytics/followers","following_url":"https://api.github.com/users/Portal-analytics/following{/other_user}","gists_url":"https://api.github.com/users/Portal-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Portal-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Portal-analytics/subscriptions","organizations_url":"https://api.github.com/users/Portal-analytics/orgs","repos_url":"https://api.github.com/users/Portal-analytics/repos","events_url":"https://api.github.com/users/Portal-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/Portal-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Portal-analytics/mixology-university","description":"Web Application that displays how to make cocktails and where the nearest bar is.","fork":false,"url":"https://api.github.com/repos/Portal-analytics/mixology-university","forks_url":"https://api.github.com/repos/Portal-analytics/mixology-university/forks","keys_url":"https://api.github.com/repos/Portal-analytics/mixology-university/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Portal-analytics/mixology-university/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Portal-analytics/mixology-university/teams","hooks_url":"https://api.github.com/repos/Portal-analytics/mixology-university/hooks","issue_events_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/events{/number}","events_url":"https://api.github.com/repos/Portal-analytics/mixology-university/events","assignees_url":"https://api.github.com/repos/Portal-analytics/mixology-university/assignees{/user}","branches_url":"https://api.github.com/repos/Portal-analytics/mixology-university/branches{/branch}","tags_url":"https://api.github.com/repos/Portal-analytics/mixology-university/tags","blobs_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/refs{/sha}","trees_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Portal-analytics/mixology-university/statuses/{sha}","languages_url":"https://api.github.com/repos/Portal-analytics/mixology-university/languages","stargazers_url":"https://api.github.com/repos/Portal-analytics/mixology-university/stargazers","contributors_url":"https://api.github.com/repos/Portal-analytics/mixology-university/contributors","subscribers_url":"https://api.github.com/repos/Portal-analytics/mixology-university/subscribers","subscription_url":"https://api.github.com/repos/Portal-analytics/mixology-university/subscription","commits_url":"https://api.github.com/repos/Portal-analytics/mixology-university/commits{/sha}","git_commits_url":"https://api.github.com/repos/Portal-analytics/mixology-university/git/commits{/sha}","comments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/comments{/number}","issue_comment_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/comments{/number}","contents_url":"https://api.github.com/repos/Portal-analytics/mixology-university/contents/{+path}","compare_url":"https://api.github.com/repos/Portal-analytics/mixology-university/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Portal-analytics/mixology-university/merges","archive_url":"https://api.github.com/repos/Portal-analytics/mixology-university/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Portal-analytics/mixology-university/downloads","issues_url":"https://api.github.com/repos/Portal-analytics/mixology-university/issues{/number}","pulls_url":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls{/number}","milestones_url":"https://api.github.com/repos/Portal-analytics/mixology-university/milestones{/number}","notifications_url":"https://api.github.com/repos/Portal-analytics/mixology-university/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Portal-analytics/mixology-university/labels{/name}","releases_url":"https://api.github.com/repos/Portal-analytics/mixology-university/releases{/id}","deployments_url":"https://api.github.com/repos/Portal-analytics/mixology-university/deployments","created_at":"2016-06-07T15:01:03Z","updated_at":"2016-06-07T15:01:03Z","pushed_at":"2016-06-17T21:52:54Z","git_url":"git://github.com/Portal-analytics/mixology-university.git","ssh_url":"git@github.com:Portal-analytics/mixology-university.git","clone_url":"https://github.com/Portal-analytics/mixology-university.git","svn_url":"https://github.com/Portal-analytics/mixology-university","homepage":null,"size":161,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5"},"html":{"href":"https://github.com/Portal-analytics/mixology-university/pull/5"},"issue":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/5"},"comments":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Portal-analytics/mixology-university/statuses/a31e728ecead45f325b307a603a3b309e41caaa5"}}}}
{"actor":{"display_login":"jack-ross"}}