{"action":"created","comment":{"url":"https://api.github.com/repos/esl/amoc/pulls/comments/71677973","id":71677973,"diff_hunk":"@@ -0,0 +1,75 @@\n+-module(amoc_api_handler).\n+\n+-export([init/3]).\n+\n+-export([rest_init/2,\n+         allowed_methods/2,\n+         content_types_accepted/2,\n+\t\t content_types_provided/2,\n+         from_json/2,\n+         process_json/2,\n+\t\t status_response/2]).\n+\n+-record(state, {action}).\n+\n+-spec init(tuple(), cowboy:req(), #state{}) -> {upgrade, protocol, cowboy_rest}.\n+init({tcp, http}, _Req, _Opts) ->\n+    {upgrade, protocol, cowboy_rest}.\n+\n+-spec rest_init(cowboy:req(), [atom()]) -> {ok, cowboy:req(), #state{}}.\n+rest_init(Req, [Action]) ->\n+    {ok, Req, #state{action = Action}}.\n+\n+-spec allowed_methods(cowboy:req(), #state{}) -> {[binary()], cowboy:req(), #state{}}.","path":"src/amoc_api_handler.erl","position":23,"original_position":23,"commit_id":"2955dee328bbe33e7758e950a769c39adec1d398","original_commit_id":"2955dee328bbe33e7758e950a769c39adec1d398","user":{"login":"elvisci","id":8136322,"avatar_url":"https://avatars.githubusercontent.com/u/8136322?v=3","gravatar_id":"","url":"https://api.github.com/users/elvisci","html_url":"https://github.com/elvisci","followers_url":"https://api.github.com/users/elvisci/followers","following_url":"https://api.github.com/users/elvisci/following{/other_user}","gists_url":"https://api.github.com/users/elvisci/gists{/gist_id}","starred_url":"https://api.github.com/users/elvisci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elvisci/subscriptions","organizations_url":"https://api.github.com/users/elvisci/orgs","repos_url":"https://api.github.com/users/elvisci/repos","events_url":"https://api.github.com/users/elvisci/events{/privacy}","received_events_url":"https://api.github.com/users/elvisci/received_events","type":"User","site_admin":false},"body":"The spec in line 23 uses a record, please define a type for the record and use that instead.","created_at":"2016-07-21T09:56:13Z","updated_at":"2016-07-21T09:56:14Z","html_url":"https://github.com/esl/amoc/pull/17#discussion_r71677973","pull_request_url":"https://api.github.com/repos/esl/amoc/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/esl/amoc/pulls/comments/71677973"},"html":{"href":"https://github.com/esl/amoc/pull/17#discussion_r71677973"},"pull_request":{"href":"https://api.github.com/repos/esl/amoc/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/esl/amoc/pulls/17","id":78288187,"html_url":"https://github.com/esl/amoc/pull/17","diff_url":"https://github.com/esl/amoc/pull/17.diff","patch_url":"https://github.com/esl/amoc/pull/17.patch","issue_url":"https://api.github.com/repos/esl/amoc/issues/17","number":17,"state":"open","locked":false,"title":"HTTP API for AMOC","user":{"login":"kklocek","id":9058693,"avatar_url":"https://avatars.githubusercontent.com/u/9058693?v=3","gravatar_id":"","url":"https://api.github.com/users/kklocek","html_url":"https://github.com/kklocek","followers_url":"https://api.github.com/users/kklocek/followers","following_url":"https://api.github.com/users/kklocek/following{/other_user}","gists_url":"https://api.github.com/users/kklocek/gists{/gist_id}","starred_url":"https://api.github.com/users/kklocek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklocek/subscriptions","organizations_url":"https://api.github.com/users/kklocek/orgs","repos_url":"https://api.github.com/users/kklocek/repos","events_url":"https://api.github.com/users/kklocek/events{/privacy}","received_events_url":"https://api.github.com/users/kklocek/received_events","type":"User","site_admin":false},"body":"Simple API where we are able to:\r\n1. Start a test\r\n2. Load test by sending .erl file\r\n3. Check liveness of AMOC\r\n4. Check status of running tests","created_at":"2016-07-21T09:55:54Z","updated_at":"2016-07-21T09:56:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dfa2bab2da4c95c3003e27edf583331d493dfa4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/esl/amoc/pulls/17/commits","review_comments_url":"https://api.github.com/repos/esl/amoc/pulls/17/comments","review_comment_url":"https://api.github.com/repos/esl/amoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/amoc/issues/17/comments","statuses_url":"https://api.github.com/repos/esl/amoc/statuses/2955dee328bbe33e7758e950a769c39adec1d398","head":{"label":"kklocek:simple_api_liveness","ref":"simple_api_liveness","sha":"2955dee328bbe33e7758e950a769c39adec1d398","user":{"login":"kklocek","id":9058693,"avatar_url":"https://avatars.githubusercontent.com/u/9058693?v=3","gravatar_id":"","url":"https://api.github.com/users/kklocek","html_url":"https://github.com/kklocek","followers_url":"https://api.github.com/users/kklocek/followers","following_url":"https://api.github.com/users/kklocek/following{/other_user}","gists_url":"https://api.github.com/users/kklocek/gists{/gist_id}","starred_url":"https://api.github.com/users/kklocek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklocek/subscriptions","organizations_url":"https://api.github.com/users/kklocek/orgs","repos_url":"https://api.github.com/users/kklocek/repos","events_url":"https://api.github.com/users/kklocek/events{/privacy}","received_events_url":"https://api.github.com/users/kklocek/received_events","type":"User","site_admin":false},"repo":{"id":63412859,"name":"amoc","full_name":"kklocek/amoc","owner":{"login":"kklocek","id":9058693,"avatar_url":"https://avatars.githubusercontent.com/u/9058693?v=3","gravatar_id":"","url":"https://api.github.com/users/kklocek","html_url":"https://github.com/kklocek","followers_url":"https://api.github.com/users/kklocek/followers","following_url":"https://api.github.com/users/kklocek/following{/other_user}","gists_url":"https://api.github.com/users/kklocek/gists{/gist_id}","starred_url":"https://api.github.com/users/kklocek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklocek/subscriptions","organizations_url":"https://api.github.com/users/kklocek/orgs","repos_url":"https://api.github.com/users/kklocek/repos","events_url":"https://api.github.com/users/kklocek/events{/privacy}","received_events_url":"https://api.github.com/users/kklocek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kklocek/amoc","description":"amoc is a simple tool for running massively parallel XMPP tests","fork":true,"url":"https://api.github.com/repos/kklocek/amoc","forks_url":"https://api.github.com/repos/kklocek/amoc/forks","keys_url":"https://api.github.com/repos/kklocek/amoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kklocek/amoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kklocek/amoc/teams","hooks_url":"https://api.github.com/repos/kklocek/amoc/hooks","issue_events_url":"https://api.github.com/repos/kklocek/amoc/issues/events{/number}","events_url":"https://api.github.com/repos/kklocek/amoc/events","assignees_url":"https://api.github.com/repos/kklocek/amoc/assignees{/user}","branches_url":"https://api.github.com/repos/kklocek/amoc/branches{/branch}","tags_url":"https://api.github.com/repos/kklocek/amoc/tags","blobs_url":"https://api.github.com/repos/kklocek/amoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kklocek/amoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kklocek/amoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/kklocek/amoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kklocek/amoc/statuses/{sha}","languages_url":"https://api.github.com/repos/kklocek/amoc/languages","stargazers_url":"https://api.github.com/repos/kklocek/amoc/stargazers","contributors_url":"https://api.github.com/repos/kklocek/amoc/contributors","subscribers_url":"https://api.github.com/repos/kklocek/amoc/subscribers","subscription_url":"https://api.github.com/repos/kklocek/amoc/subscription","commits_url":"https://api.github.com/repos/kklocek/amoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/kklocek/amoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/kklocek/amoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/kklocek/amoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/kklocek/amoc/contents/{+path}","compare_url":"https://api.github.com/repos/kklocek/amoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kklocek/amoc/merges","archive_url":"https://api.github.com/repos/kklocek/amoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kklocek/amoc/downloads","issues_url":"https://api.github.com/repos/kklocek/amoc/issues{/number}","pulls_url":"https://api.github.com/repos/kklocek/amoc/pulls{/number}","milestones_url":"https://api.github.com/repos/kklocek/amoc/milestones{/number}","notifications_url":"https://api.github.com/repos/kklocek/amoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kklocek/amoc/labels{/name}","releases_url":"https://api.github.com/repos/kklocek/amoc/releases{/id}","deployments_url":"https://api.github.com/repos/kklocek/amoc/deployments","created_at":"2016-07-15T10:13:00Z","updated_at":"2016-07-15T10:13:01Z","pushed_at":"2016-07-21T09:52:33Z","git_url":"git://github.com/kklocek/amoc.git","ssh_url":"git@github.com:kklocek/amoc.git","clone_url":"https://github.com/kklocek/amoc.git","svn_url":"https://github.com/kklocek/amoc","homepage":"","size":1088,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"03ec2021af2a8a1a8e822f5f535ec21289d42e1c","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":30109806,"name":"amoc","full_name":"esl/amoc","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/amoc","description":"amoc is a simple tool for running massively parallel XMPP tests","fork":false,"url":"https://api.github.com/repos/esl/amoc","forks_url":"https://api.github.com/repos/esl/amoc/forks","keys_url":"https://api.github.com/repos/esl/amoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/amoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/amoc/teams","hooks_url":"https://api.github.com/repos/esl/amoc/hooks","issue_events_url":"https://api.github.com/repos/esl/amoc/issues/events{/number}","events_url":"https://api.github.com/repos/esl/amoc/events","assignees_url":"https://api.github.com/repos/esl/amoc/assignees{/user}","branches_url":"https://api.github.com/repos/esl/amoc/branches{/branch}","tags_url":"https://api.github.com/repos/esl/amoc/tags","blobs_url":"https://api.github.com/repos/esl/amoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/amoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/amoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/amoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/amoc/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/amoc/languages","stargazers_url":"https://api.github.com/repos/esl/amoc/stargazers","contributors_url":"https://api.github.com/repos/esl/amoc/contributors","subscribers_url":"https://api.github.com/repos/esl/amoc/subscribers","subscription_url":"https://api.github.com/repos/esl/amoc/subscription","commits_url":"https://api.github.com/repos/esl/amoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/amoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/amoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/amoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/amoc/contents/{+path}","compare_url":"https://api.github.com/repos/esl/amoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/amoc/merges","archive_url":"https://api.github.com/repos/esl/amoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/amoc/downloads","issues_url":"https://api.github.com/repos/esl/amoc/issues{/number}","pulls_url":"https://api.github.com/repos/esl/amoc/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/amoc/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/amoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/amoc/labels{/name}","releases_url":"https://api.github.com/repos/esl/amoc/releases{/id}","deployments_url":"https://api.github.com/repos/esl/amoc/deployments","created_at":"2015-01-31T10:57:07Z","updated_at":"2016-05-24T22:09:39Z","pushed_at":"2016-07-21T09:55:54Z","git_url":"git://github.com/esl/amoc.git","ssh_url":"git@github.com:esl/amoc.git","clone_url":"https://github.com/esl/amoc.git","svn_url":"https://github.com/esl/amoc","homepage":"","size":1074,"stargazers_count":33,"watchers_count":33,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/amoc/pulls/17"},"html":{"href":"https://github.com/esl/amoc/pull/17"},"issue":{"href":"https://api.github.com/repos/esl/amoc/issues/17"},"comments":{"href":"https://api.github.com/repos/esl/amoc/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/amoc/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/amoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/amoc/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/esl/amoc/statuses/2955dee328bbe33e7758e950a769c39adec1d398"}}}}
{"actor":{"display_login":"elvisci"}}