{"action":"created","comment":{"url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/comments/204939538","pull_request_review_id":140112679,"id":204939538,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDkzOTUzOA==","diff_hunk":"@@ -1,6 +1,18 @@\n var Client = require('./riemann/client').Client;\n+const e2p = require('event-to-promise');\n+\n+// convenience methods, how convenient.\n \n-// convenience method, how convenient.\n exports.createClient = function(options, onConnect) {\n   return new Client(options, onConnect);\n-};\n\\ No newline at end of file\n+};\n+\n+exports.createPromisifiedClient = function(options) {","path":"riemann.js","position":13,"original_position":13,"commit_id":"1d01704569f560ef280a7cef045c6800deec7a24","original_commit_id":"1d01704569f560ef280a7cef045c6800deec7a24","user":{"login":"perezd","id":20598,"node_id":"MDQ6VXNlcjIwNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/20598?v=4","gravatar_id":"","url":"https://api.github.com/users/perezd","html_url":"https://github.com/perezd","followers_url":"https://api.github.com/users/perezd/followers","following_url":"https://api.github.com/users/perezd/following{/other_user}","gists_url":"https://api.github.com/users/perezd/gists{/gist_id}","starred_url":"https://api.github.com/users/perezd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perezd/subscriptions","organizations_url":"https://api.github.com/users/perezd/orgs","repos_url":"https://api.github.com/users/perezd/repos","events_url":"https://api.github.com/users/perezd/events{/privacy}","received_events_url":"https://api.github.com/users/perezd/received_events","type":"User","site_admin":false},"body":"yeah, perhaps: usePromises: true ?","created_at":"2018-07-24T23:10:10Z","updated_at":"2018-07-24T23:10:10Z","html_url":"https://github.com/perezd/riemann-nodejs-client/pull/28#discussion_r204939538","pull_request_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/comments/204939538"},"html":{"href":"https://github.com/perezd/riemann-nodejs-client/pull/28#discussion_r204939538"},"pull_request":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28"}},"in_reply_to_id":204825261},"pull_request":{"url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28","id":203434819,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDM0ODE5","html_url":"https://github.com/perezd/riemann-nodejs-client/pull/28","diff_url":"https://github.com/perezd/riemann-nodejs-client/pull/28.diff","patch_url":"https://github.com/perezd/riemann-nodejs-client/pull/28.patch","issue_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/28","number":28,"state":"open","locked":false,"title":"Promise-based workflow is now available","user":{"login":"serge-medvedev","id":14221119,"node_id":"MDQ6VXNlcjE0MjIxMTE5","avatar_url":"https://avatars0.githubusercontent.com/u/14221119?v=4","gravatar_id":"","url":"https://api.github.com/users/serge-medvedev","html_url":"https://github.com/serge-medvedev","followers_url":"https://api.github.com/users/serge-medvedev/followers","following_url":"https://api.github.com/users/serge-medvedev/following{/other_user}","gists_url":"https://api.github.com/users/serge-medvedev/gists{/gist_id}","starred_url":"https://api.github.com/users/serge-medvedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serge-medvedev/subscriptions","organizations_url":"https://api.github.com/users/serge-medvedev/orgs","repos_url":"https://api.github.com/users/serge-medvedev/repos","events_url":"https://api.github.com/users/serge-medvedev/events{/privacy}","received_events_url":"https://api.github.com/users/serge-medvedev/received_events","type":"User","site_admin":false},"body":"My proposal of promise-based workflow.\r\nTo keep the code simple, I introduced an additional dependency ([event-to-promise](https://www.npmjs.com/package/event-to-promise)).\r\nThe change seems to satisfy Derek's requirement mentioned [here](https://github.com/perezd/riemann-nodejs-client/pull/27#issuecomment-398559061).\r\nI mirrored the tests to show that both promise-based and event-based workflows are available.","created_at":"2018-07-24T07:33:35Z","updated_at":"2018-07-24T23:10:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59de606d4a0ba86f3f6736f9d429950fa8167b76","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28/commits","review_comments_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28/comments","review_comment_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/28/comments","statuses_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/statuses/1d01704569f560ef280a7cef045c6800deec7a24","head":{"label":"serge-medvedev:promisification","ref":"promisification","sha":"1d01704569f560ef280a7cef045c6800deec7a24","user":{"login":"serge-medvedev","id":14221119,"node_id":"MDQ6VXNlcjE0MjIxMTE5","avatar_url":"https://avatars0.githubusercontent.com/u/14221119?v=4","gravatar_id":"","url":"https://api.github.com/users/serge-medvedev","html_url":"https://github.com/serge-medvedev","followers_url":"https://api.github.com/users/serge-medvedev/followers","following_url":"https://api.github.com/users/serge-medvedev/following{/other_user}","gists_url":"https://api.github.com/users/serge-medvedev/gists{/gist_id}","starred_url":"https://api.github.com/users/serge-medvedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serge-medvedev/subscriptions","organizations_url":"https://api.github.com/users/serge-medvedev/orgs","repos_url":"https://api.github.com/users/serge-medvedev/repos","events_url":"https://api.github.com/users/serge-medvedev/events{/privacy}","received_events_url":"https://api.github.com/users/serge-medvedev/received_events","type":"User","site_admin":false},"repo":{"id":137940976,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc5NDA5NzY=","name":"riemann-nodejs-client","full_name":"serge-medvedev/riemann-nodejs-client","owner":{"login":"serge-medvedev","id":14221119,"node_id":"MDQ6VXNlcjE0MjIxMTE5","avatar_url":"https://avatars0.githubusercontent.com/u/14221119?v=4","gravatar_id":"","url":"https://api.github.com/users/serge-medvedev","html_url":"https://github.com/serge-medvedev","followers_url":"https://api.github.com/users/serge-medvedev/followers","following_url":"https://api.github.com/users/serge-medvedev/following{/other_user}","gists_url":"https://api.github.com/users/serge-medvedev/gists{/gist_id}","starred_url":"https://api.github.com/users/serge-medvedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serge-medvedev/subscriptions","organizations_url":"https://api.github.com/users/serge-medvedev/orgs","repos_url":"https://api.github.com/users/serge-medvedev/repos","events_url":"https://api.github.com/users/serge-medvedev/events{/privacy}","received_events_url":"https://api.github.com/users/serge-medvedev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/serge-medvedev/riemann-nodejs-client","description":"node.js client for Riemann. Because you should be monitoring all of those non-blocking buffet plates.","fork":true,"url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client","forks_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/forks","keys_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/teams","hooks_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/events","assignees_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/tags","blobs_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/subscription","commits_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/merges","archive_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/downloads","issues_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/releases{/id}","deployments_url":"https://api.github.com/repos/serge-medvedev/riemann-nodejs-client/deployments","created_at":"2018-06-19T20:15:53Z","updated_at":"2018-06-19T20:15:55Z","pushed_at":"2018-07-24T07:25:48Z","git_url":"git://github.com/serge-medvedev/riemann-nodejs-client.git","ssh_url":"git@github.com:serge-medvedev/riemann-nodejs-client.git","clone_url":"https://github.com/serge-medvedev/riemann-nodejs-client.git","svn_url":"https://github.com/serge-medvedev/riemann-nodejs-client","homepage":"","size":41,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"perezd:master","ref":"master","sha":"3ad304875461203a791575b8dd787f92e02aa300","user":{"login":"perezd","id":20598,"node_id":"MDQ6VXNlcjIwNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/20598?v=4","gravatar_id":"","url":"https://api.github.com/users/perezd","html_url":"https://github.com/perezd","followers_url":"https://api.github.com/users/perezd/followers","following_url":"https://api.github.com/users/perezd/following{/other_user}","gists_url":"https://api.github.com/users/perezd/gists{/gist_id}","starred_url":"https://api.github.com/users/perezd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perezd/subscriptions","organizations_url":"https://api.github.com/users/perezd/orgs","repos_url":"https://api.github.com/users/perezd/repos","events_url":"https://api.github.com/users/perezd/events{/privacy}","received_events_url":"https://api.github.com/users/perezd/received_events","type":"User","site_admin":false},"repo":{"id":4853523,"node_id":"MDEwOlJlcG9zaXRvcnk0ODUzNTIz","name":"riemann-nodejs-client","full_name":"perezd/riemann-nodejs-client","owner":{"login":"perezd","id":20598,"node_id":"MDQ6VXNlcjIwNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/20598?v=4","gravatar_id":"","url":"https://api.github.com/users/perezd","html_url":"https://github.com/perezd","followers_url":"https://api.github.com/users/perezd/followers","following_url":"https://api.github.com/users/perezd/following{/other_user}","gists_url":"https://api.github.com/users/perezd/gists{/gist_id}","starred_url":"https://api.github.com/users/perezd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perezd/subscriptions","organizations_url":"https://api.github.com/users/perezd/orgs","repos_url":"https://api.github.com/users/perezd/repos","events_url":"https://api.github.com/users/perezd/events{/privacy}","received_events_url":"https://api.github.com/users/perezd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/perezd/riemann-nodejs-client","description":"node.js client for Riemann. Because you should be monitoring all of those non-blocking buffet plates.","fork":false,"url":"https://api.github.com/repos/perezd/riemann-nodejs-client","forks_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/forks","keys_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/teams","hooks_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/events","assignees_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/tags","blobs_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/subscription","commits_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/merges","archive_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/downloads","issues_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/releases{/id}","deployments_url":"https://api.github.com/repos/perezd/riemann-nodejs-client/deployments","created_at":"2012-07-01T21:27:52Z","updated_at":"2018-07-16T16:09:00Z","pushed_at":"2018-07-24T07:33:36Z","git_url":"git://github.com/perezd/riemann-nodejs-client.git","ssh_url":"git@github.com:perezd/riemann-nodejs-client.git","clone_url":"https://github.com/perezd/riemann-nodejs-client.git","svn_url":"https://github.com/perezd/riemann-nodejs-client","homepage":"","size":38,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":19,"open_issues":4,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28"},"html":{"href":"https://github.com/perezd/riemann-nodejs-client/pull/28"},"issue":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/28"},"comments":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/perezd/riemann-nodejs-client/statuses/1d01704569f560ef280a7cef045c6800deec7a24"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"perezd"}}