{"action":"created","comment":{"url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/comments/42588152","id":42588152,"diff_hunk":"@@ -5,6 +5,9 @@\n   # You can have the root of your site routed with \"root\"\n   root 'robots#index'\n \n+  match '/controlbot',          to: 'control_bot#view',  via: 'get'\n+  match '/reply',               to: 'control_bot#reply',  via: 'get'","path":"config/routes.rb","position":5,"original_position":5,"commit_id":"58afb04f912e8df186c78b6fde7bc27a0cee506e","original_commit_id":"024713f488c5d8c81c67e1779233ebaf67b6f2c9","user":{"login":"fsperling","id":1224515,"avatar_url":"https://avatars.githubusercontent.com/u/1224515?v=3","gravatar_id":"","url":"https://api.github.com/users/fsperling","html_url":"https://github.com/fsperling","followers_url":"https://api.github.com/users/fsperling/followers","following_url":"https://api.github.com/users/fsperling/following{/other_user}","gists_url":"https://api.github.com/users/fsperling/gists{/gist_id}","starred_url":"https://api.github.com/users/fsperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsperling/subscriptions","organizations_url":"https://api.github.com/users/fsperling/orgs","repos_url":"https://api.github.com/users/fsperling/repos","events_url":"https://api.github.com/users/fsperling/events{/privacy}","received_events_url":"https://api.github.com/users/fsperling/received_events","type":"User","site_admin":false},"body":"Well, the robot performs certain actions triggered by cron. To test the bot I wanted to be able to manually trigger the action by calling an URL. So it's more function-like than RESTful. I think:\r\n/bot/reply\r\n/bot/searchstream\r\nwould have been better.\r\n\r\nI think the checking for mentions and replying doesn't fit so well with REST as it is kind of a batch processing job.\r\nBut you could make the results of the bots work accessible via REST:\r\n\r\n/bots/123/replies/1\r\n/bots/123/replies/2\r\n/bots/123/mentions/1\r\n...","created_at":"2015-10-21T06:38:38Z","updated_at":"2015-10-21T06:38:38Z","html_url":"https://github.com/tradegecko/ruby-exercise/pull/11#discussion_r42588152","pull_request_url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/comments/42588152"},"html":{"href":"https://github.com/tradegecko/ruby-exercise/pull/11#discussion_r42588152"},"pull_request":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11","id":46985080,"html_url":"https://github.com/tradegecko/ruby-exercise/pull/11","diff_url":"https://github.com/tradegecko/ruby-exercise/pull/11.diff","patch_url":"https://github.com/tradegecko/ruby-exercise/pull/11.patch","issue_url":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/11","number":11,"state":"open","locked":false,"title":"My solution to the ruby exercise","user":{"login":"fsperling","id":1224515,"avatar_url":"https://avatars.githubusercontent.com/u/1224515?v=3","gravatar_id":"","url":"https://api.github.com/users/fsperling","html_url":"https://github.com/fsperling","followers_url":"https://api.github.com/users/fsperling/followers","following_url":"https://api.github.com/users/fsperling/following{/other_user}","gists_url":"https://api.github.com/users/fsperling/gists{/gist_id}","starred_url":"https://api.github.com/users/fsperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsperling/subscriptions","organizations_url":"https://api.github.com/users/fsperling/orgs","repos_url":"https://api.github.com/users/fsperling/repos","events_url":"https://api.github.com/users/fsperling/events{/privacy}","received_events_url":"https://api.github.com/users/fsperling/received_events","type":"User","site_admin":false},"body":"The bot responds to mentions to @fxsperling.\r\nIf the tweet contains: !w term\r\nit looks up the term on wikipedia and replies with the beginning of the requested wiki page.\r\nIt checks for mentions every hour triggered by the heroku scheduler or on request:\r\nhttp://geckobot.herokuapp.com/controlbot","created_at":"2015-10-07T04:03:19Z","updated_at":"2015-10-21T06:38:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e68db68af7a9e52a50ff7d9a01b769eca10b7ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11/commits","review_comments_url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11/comments","review_comment_url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/11/comments","statuses_url":"https://api.github.com/repos/tradegecko/ruby-exercise/statuses/58afb04f912e8df186c78b6fde7bc27a0cee506e","head":{"label":"fsperling:master","ref":"master","sha":"58afb04f912e8df186c78b6fde7bc27a0cee506e","user":{"login":"fsperling","id":1224515,"avatar_url":"https://avatars.githubusercontent.com/u/1224515?v=3","gravatar_id":"","url":"https://api.github.com/users/fsperling","html_url":"https://github.com/fsperling","followers_url":"https://api.github.com/users/fsperling/followers","following_url":"https://api.github.com/users/fsperling/following{/other_user}","gists_url":"https://api.github.com/users/fsperling/gists{/gist_id}","starred_url":"https://api.github.com/users/fsperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsperling/subscriptions","organizations_url":"https://api.github.com/users/fsperling/orgs","repos_url":"https://api.github.com/users/fsperling/repos","events_url":"https://api.github.com/users/fsperling/events{/privacy}","received_events_url":"https://api.github.com/users/fsperling/received_events","type":"User","site_admin":false},"repo":{"id":43680839,"name":"ruby-exercise","full_name":"fsperling/ruby-exercise","owner":{"login":"fsperling","id":1224515,"avatar_url":"https://avatars.githubusercontent.com/u/1224515?v=3","gravatar_id":"","url":"https://api.github.com/users/fsperling","html_url":"https://github.com/fsperling","followers_url":"https://api.github.com/users/fsperling/followers","following_url":"https://api.github.com/users/fsperling/following{/other_user}","gists_url":"https://api.github.com/users/fsperling/gists{/gist_id}","starred_url":"https://api.github.com/users/fsperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsperling/subscriptions","organizations_url":"https://api.github.com/users/fsperling/orgs","repos_url":"https://api.github.com/users/fsperling/repos","events_url":"https://api.github.com/users/fsperling/events{/privacy}","received_events_url":"https://api.github.com/users/fsperling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fsperling/ruby-exercise","description":null,"fork":true,"url":"https://api.github.com/repos/fsperling/ruby-exercise","forks_url":"https://api.github.com/repos/fsperling/ruby-exercise/forks","keys_url":"https://api.github.com/repos/fsperling/ruby-exercise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsperling/ruby-exercise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsperling/ruby-exercise/teams","hooks_url":"https://api.github.com/repos/fsperling/ruby-exercise/hooks","issue_events_url":"https://api.github.com/repos/fsperling/ruby-exercise/issues/events{/number}","events_url":"https://api.github.com/repos/fsperling/ruby-exercise/events","assignees_url":"https://api.github.com/repos/fsperling/ruby-exercise/assignees{/user}","branches_url":"https://api.github.com/repos/fsperling/ruby-exercise/branches{/branch}","tags_url":"https://api.github.com/repos/fsperling/ruby-exercise/tags","blobs_url":"https://api.github.com/repos/fsperling/ruby-exercise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsperling/ruby-exercise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsperling/ruby-exercise/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsperling/ruby-exercise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsperling/ruby-exercise/statuses/{sha}","languages_url":"https://api.github.com/repos/fsperling/ruby-exercise/languages","stargazers_url":"https://api.github.com/repos/fsperling/ruby-exercise/stargazers","contributors_url":"https://api.github.com/repos/fsperling/ruby-exercise/contributors","subscribers_url":"https://api.github.com/repos/fsperling/ruby-exercise/subscribers","subscription_url":"https://api.github.com/repos/fsperling/ruby-exercise/subscription","commits_url":"https://api.github.com/repos/fsperling/ruby-exercise/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsperling/ruby-exercise/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsperling/ruby-exercise/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsperling/ruby-exercise/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsperling/ruby-exercise/contents/{+path}","compare_url":"https://api.github.com/repos/fsperling/ruby-exercise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsperling/ruby-exercise/merges","archive_url":"https://api.github.com/repos/fsperling/ruby-exercise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsperling/ruby-exercise/downloads","issues_url":"https://api.github.com/repos/fsperling/ruby-exercise/issues{/number}","pulls_url":"https://api.github.com/repos/fsperling/ruby-exercise/pulls{/number}","milestones_url":"https://api.github.com/repos/fsperling/ruby-exercise/milestones{/number}","notifications_url":"https://api.github.com/repos/fsperling/ruby-exercise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsperling/ruby-exercise/labels{/name}","releases_url":"https://api.github.com/repos/fsperling/ruby-exercise/releases{/id}","created_at":"2015-10-05T11:39:42Z","updated_at":"2015-10-05T11:39:43Z","pushed_at":"2015-10-21T06:15:41Z","git_url":"git://github.com/fsperling/ruby-exercise.git","ssh_url":"git@github.com:fsperling/ruby-exercise.git","clone_url":"https://github.com/fsperling/ruby-exercise.git","svn_url":"https://github.com/fsperling/ruby-exercise","homepage":null,"size":139,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tradegecko:master","ref":"master","sha":"f627b2aff6d944946a71f71b306b44d61f6aff8d","user":{"login":"tradegecko","id":1814492,"avatar_url":"https://avatars.githubusercontent.com/u/1814492?v=3","gravatar_id":"","url":"https://api.github.com/users/tradegecko","html_url":"https://github.com/tradegecko","followers_url":"https://api.github.com/users/tradegecko/followers","following_url":"https://api.github.com/users/tradegecko/following{/other_user}","gists_url":"https://api.github.com/users/tradegecko/gists{/gist_id}","starred_url":"https://api.github.com/users/tradegecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tradegecko/subscriptions","organizations_url":"https://api.github.com/users/tradegecko/orgs","repos_url":"https://api.github.com/users/tradegecko/repos","events_url":"https://api.github.com/users/tradegecko/events{/privacy}","received_events_url":"https://api.github.com/users/tradegecko/received_events","type":"Organization","site_admin":false},"repo":{"id":25526304,"name":"ruby-exercise","full_name":"tradegecko/ruby-exercise","owner":{"login":"tradegecko","id":1814492,"avatar_url":"https://avatars.githubusercontent.com/u/1814492?v=3","gravatar_id":"","url":"https://api.github.com/users/tradegecko","html_url":"https://github.com/tradegecko","followers_url":"https://api.github.com/users/tradegecko/followers","following_url":"https://api.github.com/users/tradegecko/following{/other_user}","gists_url":"https://api.github.com/users/tradegecko/gists{/gist_id}","starred_url":"https://api.github.com/users/tradegecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tradegecko/subscriptions","organizations_url":"https://api.github.com/users/tradegecko/orgs","repos_url":"https://api.github.com/users/tradegecko/repos","events_url":"https://api.github.com/users/tradegecko/events{/privacy}","received_events_url":"https://api.github.com/users/tradegecko/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tradegecko/ruby-exercise","description":null,"fork":false,"url":"https://api.github.com/repos/tradegecko/ruby-exercise","forks_url":"https://api.github.com/repos/tradegecko/ruby-exercise/forks","keys_url":"https://api.github.com/repos/tradegecko/ruby-exercise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tradegecko/ruby-exercise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tradegecko/ruby-exercise/teams","hooks_url":"https://api.github.com/repos/tradegecko/ruby-exercise/hooks","issue_events_url":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/events{/number}","events_url":"https://api.github.com/repos/tradegecko/ruby-exercise/events","assignees_url":"https://api.github.com/repos/tradegecko/ruby-exercise/assignees{/user}","branches_url":"https://api.github.com/repos/tradegecko/ruby-exercise/branches{/branch}","tags_url":"https://api.github.com/repos/tradegecko/ruby-exercise/tags","blobs_url":"https://api.github.com/repos/tradegecko/ruby-exercise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tradegecko/ruby-exercise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tradegecko/ruby-exercise/git/refs{/sha}","trees_url":"https://api.github.com/repos/tradegecko/ruby-exercise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tradegecko/ruby-exercise/statuses/{sha}","languages_url":"https://api.github.com/repos/tradegecko/ruby-exercise/languages","stargazers_url":"https://api.github.com/repos/tradegecko/ruby-exercise/stargazers","contributors_url":"https://api.github.com/repos/tradegecko/ruby-exercise/contributors","subscribers_url":"https://api.github.com/repos/tradegecko/ruby-exercise/subscribers","subscription_url":"https://api.github.com/repos/tradegecko/ruby-exercise/subscription","commits_url":"https://api.github.com/repos/tradegecko/ruby-exercise/commits{/sha}","git_commits_url":"https://api.github.com/repos/tradegecko/ruby-exercise/git/commits{/sha}","comments_url":"https://api.github.com/repos/tradegecko/ruby-exercise/comments{/number}","issue_comment_url":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/comments{/number}","contents_url":"https://api.github.com/repos/tradegecko/ruby-exercise/contents/{+path}","compare_url":"https://api.github.com/repos/tradegecko/ruby-exercise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tradegecko/ruby-exercise/merges","archive_url":"https://api.github.com/repos/tradegecko/ruby-exercise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tradegecko/ruby-exercise/downloads","issues_url":"https://api.github.com/repos/tradegecko/ruby-exercise/issues{/number}","pulls_url":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls{/number}","milestones_url":"https://api.github.com/repos/tradegecko/ruby-exercise/milestones{/number}","notifications_url":"https://api.github.com/repos/tradegecko/ruby-exercise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tradegecko/ruby-exercise/labels{/name}","releases_url":"https://api.github.com/repos/tradegecko/ruby-exercise/releases{/id}","created_at":"2014-10-21T14:17:31Z","updated_at":"2015-03-31T03:57:43Z","pushed_at":"2015-10-21T06:15:42Z","git_url":"git://github.com/tradegecko/ruby-exercise.git","ssh_url":"git@github.com:tradegecko/ruby-exercise.git","clone_url":"https://github.com/tradegecko/ruby-exercise.git","svn_url":"https://github.com/tradegecko/ruby-exercise","homepage":null,"size":654,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11"},"html":{"href":"https://github.com/tradegecko/ruby-exercise/pull/11"},"issue":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/11"},"comments":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/tradegecko/ruby-exercise/statuses/58afb04f912e8df186c78b6fde7bc27a0cee506e"}}}}