{"action":"created","comment":{"url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/comments/185297915","pull_request_review_id":116657699,"id":185297915,"diff_hunk":"@@ -0,0 +1,62 @@\n+import React from 'react';\n+import { Link } from 'react-router';\n+import SearchForm from './SearchForm';\n+\n+class SearchApp extends React.Component {\n+  constructor(props) {\n+    super(props);\n+    this.state = {\n+      searchText: '',\n+      searchResults: []\n+    }\n+    this.handleSearch = this.handleSearch.bind(this)\n+  }\n+\n+  handleSearch(input) {\n+    this.setState({ searchText: input })\n+    this.props.updateSearchResults(this.state.searchText, this.state.searchResults)\n+\n+    fetch('/api/v1/spots.json')\n+    .then(response => {\n+      if (response.ok) {\n+        return response;\n+      } else {\n+        let errorMessage = `${response.status} (${response.statusText})`,\n+            error = new Error(errorMessage);\n+        throw(error);\n+      }\n+    })\n+    .then(response => response.json())\n+    .then(spots => {\n+      let tempResults = []\n+      // debugger;\n+      spots.forEach((spot) => {\n+        if (spot.name.toLowerCase().includes(input.toLowerCase())) {\n+          tempResults.push(spot)\n+        }\n+      })\n+      console.log(tempResults)\n+      // console.log(this.state)\n+      this.setState({","path":"app/javascript/packs/components/SearchApp.js","position":null,"original_position":40,"commit_id":"7236792970ade62074cf0f21b913ad118126e2a4","original_commit_id":"e2d894cbbe5bb7bd32600bbdd6f44d22de256c3d","user":{"login":"AppDevEvan","id":32859140,"avatar_url":"https://avatars3.githubusercontent.com/u/32859140?v=4","gravatar_id":"","url":"https://api.github.com/users/AppDevEvan","html_url":"https://github.com/AppDevEvan","followers_url":"https://api.github.com/users/AppDevEvan/followers","following_url":"https://api.github.com/users/AppDevEvan/following{/other_user}","gists_url":"https://api.github.com/users/AppDevEvan/gists{/gist_id}","starred_url":"https://api.github.com/users/AppDevEvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppDevEvan/subscriptions","organizations_url":"https://api.github.com/users/AppDevEvan/orgs","repos_url":"https://api.github.com/users/AppDevEvan/repos","events_url":"https://api.github.com/users/AppDevEvan/events{/privacy}","received_events_url":"https://api.github.com/users/AppDevEvan/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-05-01T18:35:43Z","updated_at":"2018-05-01T18:35:43Z","html_url":"https://github.com/ChoiChips/arts-bostonia/pull/11#discussion_r185297915","pull_request_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/comments/185297915"},"html":{"href":"https://github.com/ChoiChips/arts-bostonia/pull/11#discussion_r185297915"},"pull_request":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11"}},"in_reply_to_id":185295956},"pull_request":{"url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11","id":185196710,"html_url":"https://github.com/ChoiChips/arts-bostonia/pull/11","diff_url":"https://github.com/ChoiChips/arts-bostonia/pull/11.diff","patch_url":"https://github.com/ChoiChips/arts-bostonia/pull/11.patch","issue_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/11","number":11,"state":"open","locked":false,"title":"Add search functionality","user":{"login":"AppDevEvan","id":32859140,"avatar_url":"https://avatars3.githubusercontent.com/u/32859140?v=4","gravatar_id":"","url":"https://api.github.com/users/AppDevEvan","html_url":"https://github.com/AppDevEvan","followers_url":"https://api.github.com/users/AppDevEvan/followers","following_url":"https://api.github.com/users/AppDevEvan/following{/other_user}","gists_url":"https://api.github.com/users/AppDevEvan/gists{/gist_id}","starred_url":"https://api.github.com/users/AppDevEvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppDevEvan/subscriptions","organizations_url":"https://api.github.com/users/AppDevEvan/orgs","repos_url":"https://api.github.com/users/AppDevEvan/repos","events_url":"https://api.github.com/users/AppDevEvan/events{/privacy}","received_events_url":"https://api.github.com/users/AppDevEvan/received_events","type":"User","site_admin":false},"body":"Please review for PR!","created_at":"2018-05-01T14:59:20Z","updated_at":"2018-05-01T18:35:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5be8f5bc86a388717352b0c2f22957c6a88bba3c","assignee":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars2.githubusercontent.com/u/16418059?v=4","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"assignees":[{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars2.githubusercontent.com/u/16418059?v=4","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11/commits","review_comments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11/comments","review_comment_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/11/comments","statuses_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/statuses/7236792970ade62074cf0f21b913ad118126e2a4","head":{"label":"ChoiChips:add_search_functionality","ref":"add_search_functionality","sha":"7236792970ade62074cf0f21b913ad118126e2a4","user":{"login":"ChoiChips","id":32844057,"avatar_url":"https://avatars0.githubusercontent.com/u/32844057?v=4","gravatar_id":"","url":"https://api.github.com/users/ChoiChips","html_url":"https://github.com/ChoiChips","followers_url":"https://api.github.com/users/ChoiChips/followers","following_url":"https://api.github.com/users/ChoiChips/following{/other_user}","gists_url":"https://api.github.com/users/ChoiChips/gists{/gist_id}","starred_url":"https://api.github.com/users/ChoiChips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChoiChips/subscriptions","organizations_url":"https://api.github.com/users/ChoiChips/orgs","repos_url":"https://api.github.com/users/ChoiChips/repos","events_url":"https://api.github.com/users/ChoiChips/events{/privacy}","received_events_url":"https://api.github.com/users/ChoiChips/received_events","type":"User","site_admin":false},"repo":{"id":130721834,"name":"arts-bostonia","full_name":"ChoiChips/arts-bostonia","owner":{"login":"ChoiChips","id":32844057,"avatar_url":"https://avatars0.githubusercontent.com/u/32844057?v=4","gravatar_id":"","url":"https://api.github.com/users/ChoiChips","html_url":"https://github.com/ChoiChips","followers_url":"https://api.github.com/users/ChoiChips/followers","following_url":"https://api.github.com/users/ChoiChips/following{/other_user}","gists_url":"https://api.github.com/users/ChoiChips/gists{/gist_id}","starred_url":"https://api.github.com/users/ChoiChips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChoiChips/subscriptions","organizations_url":"https://api.github.com/users/ChoiChips/orgs","repos_url":"https://api.github.com/users/ChoiChips/repos","events_url":"https://api.github.com/users/ChoiChips/events{/privacy}","received_events_url":"https://api.github.com/users/ChoiChips/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChoiChips/arts-bostonia","description":"Website for reviewing public art installations throughout Boston. ","fork":false,"url":"https://api.github.com/repos/ChoiChips/arts-bostonia","forks_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/forks","keys_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/teams","hooks_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/hooks","issue_events_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/events{/number}","events_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/events","assignees_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/assignees{/user}","branches_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/branches{/branch}","tags_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/tags","blobs_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/statuses/{sha}","languages_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/languages","stargazers_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/stargazers","contributors_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/contributors","subscribers_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/subscribers","subscription_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/subscription","commits_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/contents/{+path}","compare_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/merges","archive_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/downloads","issues_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues{/number}","pulls_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls{/number}","milestones_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/milestones{/number}","notifications_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/labels{/name}","releases_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/releases{/id}","deployments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/deployments","created_at":"2018-04-23T15:55:34Z","updated_at":"2018-04-30T18:33:58Z","pushed_at":"2018-05-01T18:30:47Z","git_url":"git://github.com/ChoiChips/arts-bostonia.git","ssh_url":"git@github.com:ChoiChips/arts-bostonia.git","clone_url":"https://github.com/ChoiChips/arts-bostonia.git","svn_url":"https://github.com/ChoiChips/arts-bostonia","homepage":null,"size":365,"stargazers_count":1,"watchers_count":1,"language":"Ruby","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":3,"license":null,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"ChoiChips:master","ref":"master","sha":"0ee30869e6b1294a1cc0597c62900a25031e8991","user":{"login":"ChoiChips","id":32844057,"avatar_url":"https://avatars0.githubusercontent.com/u/32844057?v=4","gravatar_id":"","url":"https://api.github.com/users/ChoiChips","html_url":"https://github.com/ChoiChips","followers_url":"https://api.github.com/users/ChoiChips/followers","following_url":"https://api.github.com/users/ChoiChips/following{/other_user}","gists_url":"https://api.github.com/users/ChoiChips/gists{/gist_id}","starred_url":"https://api.github.com/users/ChoiChips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChoiChips/subscriptions","organizations_url":"https://api.github.com/users/ChoiChips/orgs","repos_url":"https://api.github.com/users/ChoiChips/repos","events_url":"https://api.github.com/users/ChoiChips/events{/privacy}","received_events_url":"https://api.github.com/users/ChoiChips/received_events","type":"User","site_admin":false},"repo":{"id":130721834,"name":"arts-bostonia","full_name":"ChoiChips/arts-bostonia","owner":{"login":"ChoiChips","id":32844057,"avatar_url":"https://avatars0.githubusercontent.com/u/32844057?v=4","gravatar_id":"","url":"https://api.github.com/users/ChoiChips","html_url":"https://github.com/ChoiChips","followers_url":"https://api.github.com/users/ChoiChips/followers","following_url":"https://api.github.com/users/ChoiChips/following{/other_user}","gists_url":"https://api.github.com/users/ChoiChips/gists{/gist_id}","starred_url":"https://api.github.com/users/ChoiChips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChoiChips/subscriptions","organizations_url":"https://api.github.com/users/ChoiChips/orgs","repos_url":"https://api.github.com/users/ChoiChips/repos","events_url":"https://api.github.com/users/ChoiChips/events{/privacy}","received_events_url":"https://api.github.com/users/ChoiChips/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChoiChips/arts-bostonia","description":"Website for reviewing public art installations throughout Boston. ","fork":false,"url":"https://api.github.com/repos/ChoiChips/arts-bostonia","forks_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/forks","keys_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/teams","hooks_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/hooks","issue_events_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/events{/number}","events_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/events","assignees_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/assignees{/user}","branches_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/branches{/branch}","tags_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/tags","blobs_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/statuses/{sha}","languages_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/languages","stargazers_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/stargazers","contributors_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/contributors","subscribers_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/subscribers","subscription_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/subscription","commits_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/contents/{+path}","compare_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/merges","archive_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/downloads","issues_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues{/number}","pulls_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls{/number}","milestones_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/milestones{/number}","notifications_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/labels{/name}","releases_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/releases{/id}","deployments_url":"https://api.github.com/repos/ChoiChips/arts-bostonia/deployments","created_at":"2018-04-23T15:55:34Z","updated_at":"2018-04-30T18:33:58Z","pushed_at":"2018-05-01T18:30:47Z","git_url":"git://github.com/ChoiChips/arts-bostonia.git","ssh_url":"git@github.com:ChoiChips/arts-bostonia.git","clone_url":"https://github.com/ChoiChips/arts-bostonia.git","svn_url":"https://github.com/ChoiChips/arts-bostonia","homepage":null,"size":365,"stargazers_count":1,"watchers_count":1,"language":"Ruby","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":3,"license":null,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11"},"html":{"href":"https://github.com/ChoiChips/arts-bostonia/pull/11"},"issue":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/11"},"comments":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/ChoiChips/arts-bostonia/statuses/7236792970ade62074cf0f21b913ad118126e2a4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"AppDevEvan"}}