{"action":"created","comment":{"url":"https://api.github.com/repos/Skookum/eventum/pulls/comments/39185950","id":39185950,"diff_hunk":"@@ -17,12 +17,37 @@ def initialize(config)\n     # Executes a GET request on the given path\n     #\n     # @param path [String] the path of the endpoint to request\n+    # @param body [Hash] the body of the post request\n+    # @param headers [Hash] the headers of the post request\n     #\n     # @return [Faraday::Response]\n     #\n     # @api private\n-    def get(path)\n-      connection.execute(method: :get, path: path, config: @config)\n+    def get(path:, body: nil, headers: nil)\n+      connection.execute(\n+        method:  :get,\n+        path:    path,\n+        body:    body,\n+        headers: headers\n+      )\n+    end\n+\n+    # Executes a POST request on the given path\n+    #\n+    # @param path [String] the path of the endpoint to request\n+    # @param body [Hash] the body of the post request\n+    # @param headers [Hash] the headers of the post request\n+    #\n+    # @return [Faraday::Response]\n+    #\n+    # @api private\n+    def post(path:, body: nil, headers: nil)\n+      connection.execute(\n+        method:  :post,\n+        path:    path,\n+        body:    body,","path":"lib/eventum/api.rb","position":34,"original_position":34,"commit_id":"a5c3f4b63b52f6e25f1cbc5d5193481da0cbd357","original_commit_id":"a5c3f4b63b52f6e25f1cbc5d5193481da0cbd357","user":{"login":"ruprict","id":54958,"avatar_url":"https://avatars.githubusercontent.com/u/54958?v=3","gravatar_id":"","url":"https://api.github.com/users/ruprict","html_url":"https://github.com/ruprict","followers_url":"https://api.github.com/users/ruprict/followers","following_url":"https://api.github.com/users/ruprict/following{/other_user}","gists_url":"https://api.github.com/users/ruprict/gists{/gist_id}","starred_url":"https://api.github.com/users/ruprict/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruprict/subscriptions","organizations_url":"https://api.github.com/users/ruprict/orgs","repos_url":"https://api.github.com/users/ruprict/repos","events_url":"https://api.github.com/users/ruprict/events{/privacy}","received_events_url":"https://api.github.com/users/ruprict/received_events","type":"User","site_admin":false},"body":"Can this handle nested data?","created_at":"2015-09-10T17:12:25Z","updated_at":"2015-09-10T17:12:25Z","html_url":"https://github.com/Skookum/eventum/pull/1#discussion_r39185950","pull_request_url":"https://api.github.com/repos/Skookum/eventum/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/comments/39185950"},"html":{"href":"https://github.com/Skookum/eventum/pull/1#discussion_r39185950"},"pull_request":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Skookum/eventum/pulls/1","id":44692317,"html_url":"https://github.com/Skookum/eventum/pull/1","diff_url":"https://github.com/Skookum/eventum/pull/1.diff","patch_url":"https://github.com/Skookum/eventum/pull/1.patch","issue_url":"https://api.github.com/repos/Skookum/eventum/issues/1","number":1,"state":"open","locked":false,"title":"Ability to write events to a given stream","user":{"login":"Enriikke","id":1388106,"avatar_url":"https://avatars.githubusercontent.com/u/1388106?v=3","gravatar_id":"","url":"https://api.github.com/users/Enriikke","html_url":"https://github.com/Enriikke","followers_url":"https://api.github.com/users/Enriikke/followers","following_url":"https://api.github.com/users/Enriikke/following{/other_user}","gists_url":"https://api.github.com/users/Enriikke/gists{/gist_id}","starred_url":"https://api.github.com/users/Enriikke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Enriikke/subscriptions","organizations_url":"https://api.github.com/users/Enriikke/orgs","repos_url":"https://api.github.com/users/Enriikke/repos","events_url":"https://api.github.com/users/Enriikke/events{/privacy}","received_events_url":"https://api.github.com/users/Enriikke/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\nThis PR introduces a new feature that allows clients to write a single event to a given stream.\r\n\r\n```ruby\r\n#################\r\n# Example Usage #\r\n#################\r\n\r\ntype = \"event-type\"\r\nbody = { data: \"event data\" }\r\n\r\nclient = Eventum.new\r\nclient.events.create(\"stream-name\", type: type, body: body)\r\n```\r\n\r\n## Changes\r\n\r\n### 1. Eventum::Client::Events\r\n* Added a `#create` method that can be used to write an event. It requires a `stream name`, `event type`, and the `event body` to be written.\r\n\r\n### 2. Eventum::API\r\n* Added a `#post` method that can be consumed by all API clients to send HTTP POST request. It expects a `path` parameter and can optionally take `body` and `headers` values.\r\n\r\n### 3. Eventum::Connection::Request\r\n* Introduced a new request object to hold individual HTTP request properties.\r\n","created_at":"2015-09-10T16:55:16Z","updated_at":"2015-09-10T17:12:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9044bb8ce6540962f71ad0d73ca7c46f58f5504","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Skookum/eventum/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Skookum/eventum/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Skookum/eventum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Skookum/eventum/issues/1/comments","statuses_url":"https://api.github.com/repos/Skookum/eventum/statuses/a5c3f4b63b52f6e25f1cbc5d5193481da0cbd357","head":{"label":"Skookum:features/create-event","ref":"features/create-event","sha":"a5c3f4b63b52f6e25f1cbc5d5193481da0cbd357","user":{"login":"Skookum","id":314568,"avatar_url":"https://avatars.githubusercontent.com/u/314568?v=3","gravatar_id":"","url":"https://api.github.com/users/Skookum","html_url":"https://github.com/Skookum","followers_url":"https://api.github.com/users/Skookum/followers","following_url":"https://api.github.com/users/Skookum/following{/other_user}","gists_url":"https://api.github.com/users/Skookum/gists{/gist_id}","starred_url":"https://api.github.com/users/Skookum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skookum/subscriptions","organizations_url":"https://api.github.com/users/Skookum/orgs","repos_url":"https://api.github.com/users/Skookum/repos","events_url":"https://api.github.com/users/Skookum/events{/privacy}","received_events_url":"https://api.github.com/users/Skookum/received_events","type":"Organization","site_admin":false},"repo":{"id":42139894,"name":"eventum","full_name":"Skookum/eventum","owner":{"login":"Skookum","id":314568,"avatar_url":"https://avatars.githubusercontent.com/u/314568?v=3","gravatar_id":"","url":"https://api.github.com/users/Skookum","html_url":"https://github.com/Skookum","followers_url":"https://api.github.com/users/Skookum/followers","following_url":"https://api.github.com/users/Skookum/following{/other_user}","gists_url":"https://api.github.com/users/Skookum/gists{/gist_id}","starred_url":"https://api.github.com/users/Skookum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skookum/subscriptions","organizations_url":"https://api.github.com/users/Skookum/orgs","repos_url":"https://api.github.com/users/Skookum/repos","events_url":"https://api.github.com/users/Skookum/events{/privacy}","received_events_url":"https://api.github.com/users/Skookum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Skookum/eventum","description":"A Ruby wrapper for the Event Store API.","fork":false,"url":"https://api.github.com/repos/Skookum/eventum","forks_url":"https://api.github.com/repos/Skookum/eventum/forks","keys_url":"https://api.github.com/repos/Skookum/eventum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skookum/eventum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skookum/eventum/teams","hooks_url":"https://api.github.com/repos/Skookum/eventum/hooks","issue_events_url":"https://api.github.com/repos/Skookum/eventum/issues/events{/number}","events_url":"https://api.github.com/repos/Skookum/eventum/events","assignees_url":"https://api.github.com/repos/Skookum/eventum/assignees{/user}","branches_url":"https://api.github.com/repos/Skookum/eventum/branches{/branch}","tags_url":"https://api.github.com/repos/Skookum/eventum/tags","blobs_url":"https://api.github.com/repos/Skookum/eventum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skookum/eventum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skookum/eventum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skookum/eventum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skookum/eventum/statuses/{sha}","languages_url":"https://api.github.com/repos/Skookum/eventum/languages","stargazers_url":"https://api.github.com/repos/Skookum/eventum/stargazers","contributors_url":"https://api.github.com/repos/Skookum/eventum/contributors","subscribers_url":"https://api.github.com/repos/Skookum/eventum/subscribers","subscription_url":"https://api.github.com/repos/Skookum/eventum/subscription","commits_url":"https://api.github.com/repos/Skookum/eventum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skookum/eventum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skookum/eventum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skookum/eventum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skookum/eventum/contents/{+path}","compare_url":"https://api.github.com/repos/Skookum/eventum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skookum/eventum/merges","archive_url":"https://api.github.com/repos/Skookum/eventum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skookum/eventum/downloads","issues_url":"https://api.github.com/repos/Skookum/eventum/issues{/number}","pulls_url":"https://api.github.com/repos/Skookum/eventum/pulls{/number}","milestones_url":"https://api.github.com/repos/Skookum/eventum/milestones{/number}","notifications_url":"https://api.github.com/repos/Skookum/eventum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skookum/eventum/labels{/name}","releases_url":"https://api.github.com/repos/Skookum/eventum/releases{/id}","created_at":"2015-09-08T21:26:07Z","updated_at":"2015-09-08T21:31:43Z","pushed_at":"2015-09-10T16:55:17Z","git_url":"git://github.com/Skookum/eventum.git","ssh_url":"git@github.com:Skookum/eventum.git","clone_url":"https://github.com/Skookum/eventum.git","svn_url":"https://github.com/Skookum/eventum","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Skookum:master","ref":"master","sha":"7d7b07e2e49d7536b0238b61b5fee2b7879e3837","user":{"login":"Skookum","id":314568,"avatar_url":"https://avatars.githubusercontent.com/u/314568?v=3","gravatar_id":"","url":"https://api.github.com/users/Skookum","html_url":"https://github.com/Skookum","followers_url":"https://api.github.com/users/Skookum/followers","following_url":"https://api.github.com/users/Skookum/following{/other_user}","gists_url":"https://api.github.com/users/Skookum/gists{/gist_id}","starred_url":"https://api.github.com/users/Skookum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skookum/subscriptions","organizations_url":"https://api.github.com/users/Skookum/orgs","repos_url":"https://api.github.com/users/Skookum/repos","events_url":"https://api.github.com/users/Skookum/events{/privacy}","received_events_url":"https://api.github.com/users/Skookum/received_events","type":"Organization","site_admin":false},"repo":{"id":42139894,"name":"eventum","full_name":"Skookum/eventum","owner":{"login":"Skookum","id":314568,"avatar_url":"https://avatars.githubusercontent.com/u/314568?v=3","gravatar_id":"","url":"https://api.github.com/users/Skookum","html_url":"https://github.com/Skookum","followers_url":"https://api.github.com/users/Skookum/followers","following_url":"https://api.github.com/users/Skookum/following{/other_user}","gists_url":"https://api.github.com/users/Skookum/gists{/gist_id}","starred_url":"https://api.github.com/users/Skookum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skookum/subscriptions","organizations_url":"https://api.github.com/users/Skookum/orgs","repos_url":"https://api.github.com/users/Skookum/repos","events_url":"https://api.github.com/users/Skookum/events{/privacy}","received_events_url":"https://api.github.com/users/Skookum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Skookum/eventum","description":"A Ruby wrapper for the Event Store API.","fork":false,"url":"https://api.github.com/repos/Skookum/eventum","forks_url":"https://api.github.com/repos/Skookum/eventum/forks","keys_url":"https://api.github.com/repos/Skookum/eventum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skookum/eventum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skookum/eventum/teams","hooks_url":"https://api.github.com/repos/Skookum/eventum/hooks","issue_events_url":"https://api.github.com/repos/Skookum/eventum/issues/events{/number}","events_url":"https://api.github.com/repos/Skookum/eventum/events","assignees_url":"https://api.github.com/repos/Skookum/eventum/assignees{/user}","branches_url":"https://api.github.com/repos/Skookum/eventum/branches{/branch}","tags_url":"https://api.github.com/repos/Skookum/eventum/tags","blobs_url":"https://api.github.com/repos/Skookum/eventum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skookum/eventum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skookum/eventum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skookum/eventum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skookum/eventum/statuses/{sha}","languages_url":"https://api.github.com/repos/Skookum/eventum/languages","stargazers_url":"https://api.github.com/repos/Skookum/eventum/stargazers","contributors_url":"https://api.github.com/repos/Skookum/eventum/contributors","subscribers_url":"https://api.github.com/repos/Skookum/eventum/subscribers","subscription_url":"https://api.github.com/repos/Skookum/eventum/subscription","commits_url":"https://api.github.com/repos/Skookum/eventum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skookum/eventum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skookum/eventum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skookum/eventum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skookum/eventum/contents/{+path}","compare_url":"https://api.github.com/repos/Skookum/eventum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skookum/eventum/merges","archive_url":"https://api.github.com/repos/Skookum/eventum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skookum/eventum/downloads","issues_url":"https://api.github.com/repos/Skookum/eventum/issues{/number}","pulls_url":"https://api.github.com/repos/Skookum/eventum/pulls{/number}","milestones_url":"https://api.github.com/repos/Skookum/eventum/milestones{/number}","notifications_url":"https://api.github.com/repos/Skookum/eventum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skookum/eventum/labels{/name}","releases_url":"https://api.github.com/repos/Skookum/eventum/releases{/id}","created_at":"2015-09-08T21:26:07Z","updated_at":"2015-09-08T21:31:43Z","pushed_at":"2015-09-10T16:55:17Z","git_url":"git://github.com/Skookum/eventum.git","ssh_url":"git@github.com:Skookum/eventum.git","clone_url":"https://github.com/Skookum/eventum.git","svn_url":"https://github.com/Skookum/eventum","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/1"},"html":{"href":"https://github.com/Skookum/eventum/pull/1"},"issue":{"href":"https://api.github.com/repos/Skookum/eventum/issues/1"},"comments":{"href":"https://api.github.com/repos/Skookum/eventum/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Skookum/eventum/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Skookum/eventum/statuses/a5c3f4b63b52f6e25f1cbc5d5193481da0cbd357"}}}}