{"action":"created","comment":{"url":"https://api.github.com/repos/customerio/customerio-node/pulls/comments/174272300","pull_request_review_id":103598631,"id":174272300,"diff_hunk":"@@ -1,5 +1,6 @@\n const Request = require('./request')\n-const root = 'https://track.customer.io/api/v1'\n+const trackRoot = 'https://track.customer.io/api/v1'\n+const apiRoot = 'https://api.customer.io/api/v1'","path":"lib/index.js","position":null,"original_position":4,"commit_id":"0d2e9328663370655e6fa471e663223a0616e15f","original_commit_id":"9f46f79c741ba694e50c0a0db21dd72930d84b6f","user":{"login":"jescalan","id":556932,"avatar_url":"https://avatars2.githubusercontent.com/u/556932?v=4","gravatar_id":"","url":"https://api.github.com/users/jescalan","html_url":"https://github.com/jescalan","followers_url":"https://api.github.com/users/jescalan/followers","following_url":"https://api.github.com/users/jescalan/following{/other_user}","gists_url":"https://api.github.com/users/jescalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jescalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jescalan/subscriptions","organizations_url":"https://api.github.com/users/jescalan/orgs","repos_url":"https://api.github.com/users/jescalan/repos","events_url":"https://api.github.com/users/jescalan/events{/privacy}","received_events_url":"https://api.github.com/users/jescalan/received_events","type":"User","site_admin":false},"body":"ook let's see if this round did it!","created_at":"2018-03-13T20:25:47Z","updated_at":"2018-03-13T20:25:47Z","html_url":"https://github.com/customerio/customerio-node/pull/13#discussion_r174272300","pull_request_url":"https://api.github.com/repos/customerio/customerio-node/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/comments/174272300"},"html":{"href":"https://github.com/customerio/customerio-node/pull/13#discussion_r174272300"},"pull_request":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/13"}},"in_reply_to_id":174268761},"pull_request":{"url":"https://api.github.com/repos/customerio/customerio-node/pulls/13","id":170624090,"html_url":"https://github.com/customerio/customerio-node/pull/13","diff_url":"https://github.com/customerio/customerio-node/pull/13.diff","patch_url":"https://github.com/customerio/customerio-node/pull/13.patch","issue_url":"https://api.github.com/repos/customerio/customerio-node/issues/13","number":13,"state":"open","locked":false,"title":"Update everything!","user":{"login":"jescalan","id":556932,"avatar_url":"https://avatars2.githubusercontent.com/u/556932?v=4","gravatar_id":"","url":"https://api.github.com/users/jescalan","html_url":"https://github.com/jescalan","followers_url":"https://api.github.com/users/jescalan/followers","following_url":"https://api.github.com/users/jescalan/following{/other_user}","gists_url":"https://api.github.com/users/jescalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jescalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jescalan/subscriptions","organizations_url":"https://api.github.com/users/jescalan/orgs","repos_url":"https://api.github.com/users/jescalan/repos","events_url":"https://api.github.com/users/jescalan/events{/privacy}","received_events_url":"https://api.github.com/users/jescalan/received_events","type":"User","site_admin":false},"body":"Hey friends,\r\n\r\nSo I rewrote this library almost completely. I know this is exactly the type of PR that I don't particularly enjoy seeing myself, but I felt like it was justified for a couple reasons:\r\n\r\n- The dependencies hadn't been touched in 4+ years\r\n- The API surface area was incomplete, and missing several officially supported methods\r\n- Javascript has changed and got a lot better in the last couple of years\r\n\r\nHere's what I did:\r\n\r\n- Modernized all the javascript to es6. Prototype classes turned into real classes, external dependency promises to native promises, `_this = this` eliminated through arrow functions, all code formatted using prettier, etc.\r\n- Brought all dependencies up to date, made sure that no test dependencies were in the normal dependencies section (there was one big one previously).\r\n- Rewrote the tests using ava instead of mocha. Ava has a very strong integration with the `nyc` package for test coverage, is a little smaller and more clear, and doesn't pipe in a bunch of globals that you need to guess. The tests themselves are effectively the same despite this.\r\n- Added support for anonymous event tracking and the `triggerBroadcast` endpoint, and added test coverage for these as well\r\n- Eliminated a lot of repeated or useless code and generally decreased the footprint by a lot.\r\n\r\nAll tests are passing, test coverage has been improved, and I'm hoping you guys will accept this. I would be happy to maintain it to the best of my ability as things change - I know that I will be relying on this code for my job regardless, so it's a good fit.\r\n\r\nThank you for making an awesome email platform, and sending over much love from HashiCorp 💖 \r\n\r\nAlso, this closes #12, and incorporates the suggestion","created_at":"2018-02-22T00:09:58Z","updated_at":"2018-03-13T20:25:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0334cd83000ccd71c515214e02ce142c3b68dd94","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kevinkucharczyk","id":3127419,"avatar_url":"https://avatars0.githubusercontent.com/u/3127419?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinkucharczyk","html_url":"https://github.com/kevinkucharczyk","followers_url":"https://api.github.com/users/kevinkucharczyk/followers","following_url":"https://api.github.com/users/kevinkucharczyk/following{/other_user}","gists_url":"https://api.github.com/users/kevinkucharczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkucharczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkucharczyk/subscriptions","organizations_url":"https://api.github.com/users/kevinkucharczyk/orgs","repos_url":"https://api.github.com/users/kevinkucharczyk/repos","events_url":"https://api.github.com/users/kevinkucharczyk/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkucharczyk/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/customerio/customerio-node/pulls/13/commits","review_comments_url":"https://api.github.com/repos/customerio/customerio-node/pulls/13/comments","review_comment_url":"https://api.github.com/repos/customerio/customerio-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/customerio/customerio-node/issues/13/comments","statuses_url":"https://api.github.com/repos/customerio/customerio-node/statuses/0d2e9328663370655e6fa471e663223a0616e15f","head":{"label":"hashicorp:master","ref":"master","sha":"0d2e9328663370655e6fa471e663223a0616e15f","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":122365768,"name":"customerio-node","full_name":"hashicorp/customerio-node","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/customerio-node","description":"A node.js client for the Customer.io REST API.  http://customer.io/docs/api/rest.html","fork":true,"url":"https://api.github.com/repos/hashicorp/customerio-node","forks_url":"https://api.github.com/repos/hashicorp/customerio-node/forks","keys_url":"https://api.github.com/repos/hashicorp/customerio-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/customerio-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/customerio-node/teams","hooks_url":"https://api.github.com/repos/hashicorp/customerio-node/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/customerio-node/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/customerio-node/events","assignees_url":"https://api.github.com/repos/hashicorp/customerio-node/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/customerio-node/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/customerio-node/tags","blobs_url":"https://api.github.com/repos/hashicorp/customerio-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/customerio-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/customerio-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/customerio-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/customerio-node/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/customerio-node/languages","stargazers_url":"https://api.github.com/repos/hashicorp/customerio-node/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/customerio-node/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/customerio-node/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/customerio-node/subscription","commits_url":"https://api.github.com/repos/hashicorp/customerio-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/customerio-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/customerio-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/customerio-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/customerio-node/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/customerio-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/customerio-node/merges","archive_url":"https://api.github.com/repos/hashicorp/customerio-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/customerio-node/downloads","issues_url":"https://api.github.com/repos/hashicorp/customerio-node/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/customerio-node/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/customerio-node/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/customerio-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/customerio-node/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/customerio-node/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/customerio-node/deployments","created_at":"2018-02-21T17:01:33Z","updated_at":"2018-03-13T20:25:36Z","pushed_at":"2018-03-13T20:25:35Z","git_url":"git://github.com/hashicorp/customerio-node.git","ssh_url":"git@github.com:hashicorp/customerio-node.git","clone_url":"https://github.com/hashicorp/customerio-node.git","svn_url":"https://github.com/hashicorp/customerio-node","homepage":"","size":65,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"customerio:master","ref":"master","sha":"b691aa1fb5ec2d7587657e5408fec9daae476df4","user":{"login":"customerio","id":1152079,"avatar_url":"https://avatars2.githubusercontent.com/u/1152079?v=4","gravatar_id":"","url":"https://api.github.com/users/customerio","html_url":"https://github.com/customerio","followers_url":"https://api.github.com/users/customerio/followers","following_url":"https://api.github.com/users/customerio/following{/other_user}","gists_url":"https://api.github.com/users/customerio/gists{/gist_id}","starred_url":"https://api.github.com/users/customerio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/customerio/subscriptions","organizations_url":"https://api.github.com/users/customerio/orgs","repos_url":"https://api.github.com/users/customerio/repos","events_url":"https://api.github.com/users/customerio/events{/privacy}","received_events_url":"https://api.github.com/users/customerio/received_events","type":"Organization","site_admin":false},"repo":{"id":20968785,"name":"customerio-node","full_name":"customerio/customerio-node","owner":{"login":"customerio","id":1152079,"avatar_url":"https://avatars2.githubusercontent.com/u/1152079?v=4","gravatar_id":"","url":"https://api.github.com/users/customerio","html_url":"https://github.com/customerio","followers_url":"https://api.github.com/users/customerio/followers","following_url":"https://api.github.com/users/customerio/following{/other_user}","gists_url":"https://api.github.com/users/customerio/gists{/gist_id}","starred_url":"https://api.github.com/users/customerio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/customerio/subscriptions","organizations_url":"https://api.github.com/users/customerio/orgs","repos_url":"https://api.github.com/users/customerio/repos","events_url":"https://api.github.com/users/customerio/events{/privacy}","received_events_url":"https://api.github.com/users/customerio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/customerio/customerio-node","description":"A node.js client for the Customer.io REST API.  http://customer.io/docs/api/rest.html","fork":false,"url":"https://api.github.com/repos/customerio/customerio-node","forks_url":"https://api.github.com/repos/customerio/customerio-node/forks","keys_url":"https://api.github.com/repos/customerio/customerio-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/customerio/customerio-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/customerio/customerio-node/teams","hooks_url":"https://api.github.com/repos/customerio/customerio-node/hooks","issue_events_url":"https://api.github.com/repos/customerio/customerio-node/issues/events{/number}","events_url":"https://api.github.com/repos/customerio/customerio-node/events","assignees_url":"https://api.github.com/repos/customerio/customerio-node/assignees{/user}","branches_url":"https://api.github.com/repos/customerio/customerio-node/branches{/branch}","tags_url":"https://api.github.com/repos/customerio/customerio-node/tags","blobs_url":"https://api.github.com/repos/customerio/customerio-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/customerio/customerio-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/customerio/customerio-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/customerio/customerio-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/customerio/customerio-node/statuses/{sha}","languages_url":"https://api.github.com/repos/customerio/customerio-node/languages","stargazers_url":"https://api.github.com/repos/customerio/customerio-node/stargazers","contributors_url":"https://api.github.com/repos/customerio/customerio-node/contributors","subscribers_url":"https://api.github.com/repos/customerio/customerio-node/subscribers","subscription_url":"https://api.github.com/repos/customerio/customerio-node/subscription","commits_url":"https://api.github.com/repos/customerio/customerio-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/customerio/customerio-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/customerio/customerio-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/customerio/customerio-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/customerio/customerio-node/contents/{+path}","compare_url":"https://api.github.com/repos/customerio/customerio-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/customerio/customerio-node/merges","archive_url":"https://api.github.com/repos/customerio/customerio-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/customerio/customerio-node/downloads","issues_url":"https://api.github.com/repos/customerio/customerio-node/issues{/number}","pulls_url":"https://api.github.com/repos/customerio/customerio-node/pulls{/number}","milestones_url":"https://api.github.com/repos/customerio/customerio-node/milestones{/number}","notifications_url":"https://api.github.com/repos/customerio/customerio-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/customerio/customerio-node/labels{/name}","releases_url":"https://api.github.com/repos/customerio/customerio-node/releases{/id}","deployments_url":"https://api.github.com/repos/customerio/customerio-node/deployments","created_at":"2014-06-18T16:09:25Z","updated_at":"2018-02-21T00:12:01Z","pushed_at":"2018-03-13T20:25:36Z","git_url":"git://github.com/customerio/customerio-node.git","ssh_url":"git@github.com:customerio/customerio-node.git","clone_url":"https://github.com/customerio/customerio-node.git","svn_url":"https://github.com/customerio/customerio-node","homepage":"","size":22,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/13"},"html":{"href":"https://github.com/customerio/customerio-node/pull/13"},"issue":{"href":"https://api.github.com/repos/customerio/customerio-node/issues/13"},"comments":{"href":"https://api.github.com/repos/customerio/customerio-node/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/customerio/customerio-node/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/customerio/customerio-node/statuses/0d2e9328663370655e6fa471e663223a0616e15f"}},"author_association":"NONE"}}
{"actor":{"display_login":"jescalan"}}