{"action":"created","comment":{"url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/comments/41024605","id":41024605,"diff_hunk":"@@ -0,0 +1,55 @@\n+class Twitter < ActiveRecord::Base\n+  require 'rubygems'\n+  require 'oauth'\n+  require 'json'\n+\n+  $baseurl = \"https://api.twitter.com\"\n+  $consumer_key = OAuth::Consumer.new(\n+      ENV[\"TWITTER_CONSUMER_KEY\"],\n+      ENV[\"TWITTER_SECRET_KEY\"]\n+  )\n+\n+  $access_token = OAuth::Token.new(\n+      ENV[\"TWITTER_ACCESS_TOKEN\"],\n+      ENV[\"TWITTER_SECRET_TOKEN\"]\n+  )\n+\n+  def self.find_tweets(user, since_id)\n+  \tpath = \"/1.1/statuses/user_timeline.json\"\n+  \toptions = Hash.new()\n+  \t# options[\"q\"] = \"@#{user}\"\n+    options[\"screen_name\"] = \"#{user}\"\n+  \toptions[\"result_type\"] = \"recent\"\n+  \toptions[\"count\"] = \"1\"\n+  \tif since_id then\n+  \t\toptions[\"since_id\"] = since_id\n+  \tend\n+  \tquery = URI.encode_www_form(options)\n+  \taddress = URI(\"#{$baseurl}#{path}?#{query}&include_rts=false&exclude_replies=true\")\n+\n+    request = Net::HTTP::Get.new address.request_uri\n+\n+    response = send_request(address, request)\n+    id = JSON.parse(response.body)[0]['id_str']\n+\n+    path = \"/1.1/statuses/oembed.json\"\n+\n+  \taddress = URI(\"#{$baseurl}#{path}?id=#{id}&align=center&hide_media=true&hide_thread=true&theme=dark\")\n+\n+    request = Net::HTTP::Get.new address.request_uri\n+\n+    response = send_request(address, request)\n+\n+  \tJSON.parse(response.body)\n+  end\n+\n+  def self.send_request(address, request)\n+  \thttp             = Net::HTTP.new address.host, address.port\n+  \thttp.use_ssl     = true\n+    http.verify_mode = OpenSSL::SSL::VERIFY_PEER","path":"app/models/twitter.rb","position":49,"original_position":49,"commit_id":"6919875462e421f22e629f35da76976e28b93bb4","original_commit_id":"6919875462e421f22e629f35da76976e28b93bb4","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Inconsistent indentation detected.","created_at":"2015-10-02T14:07:57Z","updated_at":"2015-10-02T14:07:57Z","html_url":"https://github.com/Timothyl/team_alot_group_project/pull/24#discussion_r41024605","pull_request_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/comments/41024605"},"html":{"href":"https://github.com/Timothyl/team_alot_group_project/pull/24#discussion_r41024605"},"pull_request":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24","id":46638159,"html_url":"https://github.com/Timothyl/team_alot_group_project/pull/24","diff_url":"https://github.com/Timothyl/team_alot_group_project/pull/24.diff","patch_url":"https://github.com/Timothyl/team_alot_group_project/pull/24.patch","issue_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/24","number":24,"state":"open","locked":false,"title":"Twitter","user":{"login":"Timothyl","id":6969255,"avatar_url":"https://avatars.githubusercontent.com/u/6969255?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyl","html_url":"https://github.com/Timothyl","followers_url":"https://api.github.com/users/Timothyl/followers","following_url":"https://api.github.com/users/Timothyl/following{/other_user}","gists_url":"https://api.github.com/users/Timothyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyl/subscriptions","organizations_url":"https://api.github.com/users/Timothyl/orgs","repos_url":"https://api.github.com/users/Timothyl/repos","events_url":"https://api.github.com/users/Timothyl/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyl/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-02T14:00:23Z","updated_at":"2015-10-02T14:07:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb7bd62a6fbb72ceafe22a7c5b3dceb7ce94490a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24/commits","review_comments_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24/comments","review_comment_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/24/comments","statuses_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/statuses/6919875462e421f22e629f35da76976e28b93bb4","head":{"label":"Timothyl:twitter","ref":"twitter","sha":"6919875462e421f22e629f35da76976e28b93bb4","user":{"login":"Timothyl","id":6969255,"avatar_url":"https://avatars.githubusercontent.com/u/6969255?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyl","html_url":"https://github.com/Timothyl","followers_url":"https://api.github.com/users/Timothyl/followers","following_url":"https://api.github.com/users/Timothyl/following{/other_user}","gists_url":"https://api.github.com/users/Timothyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyl/subscriptions","organizations_url":"https://api.github.com/users/Timothyl/orgs","repos_url":"https://api.github.com/users/Timothyl/repos","events_url":"https://api.github.com/users/Timothyl/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyl/received_events","type":"User","site_admin":false},"repo":{"id":42872203,"name":"team_alot_group_project","full_name":"Timothyl/team_alot_group_project","owner":{"login":"Timothyl","id":6969255,"avatar_url":"https://avatars.githubusercontent.com/u/6969255?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyl","html_url":"https://github.com/Timothyl","followers_url":"https://api.github.com/users/Timothyl/followers","following_url":"https://api.github.com/users/Timothyl/following{/other_user}","gists_url":"https://api.github.com/users/Timothyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyl/subscriptions","organizations_url":"https://api.github.com/users/Timothyl/orgs","repos_url":"https://api.github.com/users/Timothyl/repos","events_url":"https://api.github.com/users/Timothyl/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Timothyl/team_alot_group_project","description":null,"fork":false,"url":"https://api.github.com/repos/Timothyl/team_alot_group_project","forks_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/forks","keys_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/teams","hooks_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/hooks","issue_events_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/events{/number}","events_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/events","assignees_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/assignees{/user}","branches_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/branches{/branch}","tags_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/tags","blobs_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/statuses/{sha}","languages_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/languages","stargazers_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/stargazers","contributors_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/contributors","subscribers_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/subscribers","subscription_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/subscription","commits_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/contents/{+path}","compare_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/merges","archive_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/downloads","issues_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues{/number}","pulls_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls{/number}","milestones_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/milestones{/number}","notifications_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/labels{/name}","releases_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/releases{/id}","created_at":"2015-09-21T14:42:29Z","updated_at":"2015-09-22T15:50:12Z","pushed_at":"2015-10-02T14:07:50Z","git_url":"git://github.com/Timothyl/team_alot_group_project.git","ssh_url":"git@github.com:Timothyl/team_alot_group_project.git","clone_url":"https://github.com/Timothyl/team_alot_group_project.git","svn_url":"https://github.com/Timothyl/team_alot_group_project","homepage":null,"size":2415,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Timothyl:master","ref":"master","sha":"6421e650aef197ea5507675cce80fb1bbe63a960","user":{"login":"Timothyl","id":6969255,"avatar_url":"https://avatars.githubusercontent.com/u/6969255?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyl","html_url":"https://github.com/Timothyl","followers_url":"https://api.github.com/users/Timothyl/followers","following_url":"https://api.github.com/users/Timothyl/following{/other_user}","gists_url":"https://api.github.com/users/Timothyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyl/subscriptions","organizations_url":"https://api.github.com/users/Timothyl/orgs","repos_url":"https://api.github.com/users/Timothyl/repos","events_url":"https://api.github.com/users/Timothyl/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyl/received_events","type":"User","site_admin":false},"repo":{"id":42872203,"name":"team_alot_group_project","full_name":"Timothyl/team_alot_group_project","owner":{"login":"Timothyl","id":6969255,"avatar_url":"https://avatars.githubusercontent.com/u/6969255?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyl","html_url":"https://github.com/Timothyl","followers_url":"https://api.github.com/users/Timothyl/followers","following_url":"https://api.github.com/users/Timothyl/following{/other_user}","gists_url":"https://api.github.com/users/Timothyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyl/subscriptions","organizations_url":"https://api.github.com/users/Timothyl/orgs","repos_url":"https://api.github.com/users/Timothyl/repos","events_url":"https://api.github.com/users/Timothyl/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Timothyl/team_alot_group_project","description":null,"fork":false,"url":"https://api.github.com/repos/Timothyl/team_alot_group_project","forks_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/forks","keys_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/teams","hooks_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/hooks","issue_events_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/events{/number}","events_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/events","assignees_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/assignees{/user}","branches_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/branches{/branch}","tags_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/tags","blobs_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/statuses/{sha}","languages_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/languages","stargazers_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/stargazers","contributors_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/contributors","subscribers_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/subscribers","subscription_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/subscription","commits_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/contents/{+path}","compare_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/merges","archive_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/downloads","issues_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues{/number}","pulls_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls{/number}","milestones_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/milestones{/number}","notifications_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/labels{/name}","releases_url":"https://api.github.com/repos/Timothyl/team_alot_group_project/releases{/id}","created_at":"2015-09-21T14:42:29Z","updated_at":"2015-09-22T15:50:12Z","pushed_at":"2015-10-02T14:07:50Z","git_url":"git://github.com/Timothyl/team_alot_group_project.git","ssh_url":"git@github.com:Timothyl/team_alot_group_project.git","clone_url":"https://github.com/Timothyl/team_alot_group_project.git","svn_url":"https://github.com/Timothyl/team_alot_group_project","homepage":null,"size":2415,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24"},"html":{"href":"https://github.com/Timothyl/team_alot_group_project/pull/24"},"issue":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/24"},"comments":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/Timothyl/team_alot_group_project/statuses/6919875462e421f22e629f35da76976e28b93bb4"}}}}