{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/comments/79471537","id":79471537,"diff_hunk":"@@ -55,6 +55,25 @@ class NorthstarClient {\n     return agent;\n   }\n \n+  /**\n+   * Helper function to execute simple post.\n+   */\n+  executePost(endpoint, data, query) {\n+    const agent = request\n+      .post(`${this.baseURI}/${endpoint}`)","path":"lib/northstar-client.js","position":9,"original_position":9,"commit_id":"35522f2056b2bae2033b8c6bbccd9f1a22706e83","original_commit_id":"35522f2056b2bae2033b8c6bbccd9f1a22706e83","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"Thanks for the 👀 @DFurnes -- here [was the fix, actually use `post`](https://github.com/DoSomething/northstar-js/commit/35522f2056b2bae2033b8c6bbccd9f1a22706e83#commitcomment-19083911) instead of `get`! :facepalm:\r\n","created_at":"2016-09-19T19:37:26Z","updated_at":"2016-09-19T19:37:27Z","html_url":"https://github.com/DoSomething/northstar-js/pull/19#discussion_r79471537","pull_request_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/comments/79471537"},"html":{"href":"https://github.com/DoSomething/northstar-js/pull/19#discussion_r79471537"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19","id":85851897,"html_url":"https://github.com/DoSomething/northstar-js/pull/19","diff_url":"https://github.com/DoSomething/northstar-js/pull/19.diff","patch_url":"https://github.com/DoSomething/northstar-js/pull/19.patch","issue_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/19","number":19,"state":"open","locked":false,"title":"Adds client.executePost, Users.create","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\n* Adds a `executePost(endpoint, data, query)` function to our `northstar-client`\r\n* Adds `Users.create(data)` which posts `data` to the Users endpoint\r\n* Adds a test, which passes but I'm not seeing any Users created on staging.dosomething.org/admin/users, which suggests something isn't working correctly. \r\n\r\n#### How should this be reviewed?\r\nRun `npm test`. All tests should pass. However you'd expect to see a User created in Staging Phoenix and there is none.\r\n\r\n@DFurnes do you see any gotchas i'm missing? 👀  My `DS_REST_API_BASEURI` is set to https://northstar-qa.dosomething.org/v1\r\n\r\n#### Any background context you want to provide?\r\nAdding the `executePost` to work on #13, but we're unable to pass a User to the Signups endpoint (Refs https://github.com/DoSomething/northstar/issues/429)\r\n\r\n#### Relevant tickets\r\n#13, https://github.com/DoSomething/gambit/issues/606\r\n\r\n#### Checklist\r\n- [ ] Run tests\r\n- [ ] Add new or update existing tests if applicable\r\n\r\n","created_at":"2016-09-19T19:13:59Z","updated_at":"2016-09-19T19:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a22117e1741ebb83d84ebd70fcdd93fa2891eb12","assignee":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"assignees":[{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19/commits","review_comments_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19/comments","review_comment_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/19/comments","statuses_url":"https://api.github.com/repos/DoSomething/northstar-js/statuses/35522f2056b2bae2033b8c6bbccd9f1a22706e83","head":{"label":"DoSomething:post","ref":"post","sha":"35522f2056b2bae2033b8c6bbccd9f1a22706e83","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":59578414,"name":"northstar-js","full_name":"DoSomething/northstar-js","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/northstar-js","description":"Node.js client for Northstar, the DoSomething.org user API.","fork":false,"url":"https://api.github.com/repos/DoSomething/northstar-js","forks_url":"https://api.github.com/repos/DoSomething/northstar-js/forks","keys_url":"https://api.github.com/repos/DoSomething/northstar-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/northstar-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/northstar-js/teams","hooks_url":"https://api.github.com/repos/DoSomething/northstar-js/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/northstar-js/events","assignees_url":"https://api.github.com/repos/DoSomething/northstar-js/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/northstar-js/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/northstar-js/tags","blobs_url":"https://api.github.com/repos/DoSomething/northstar-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/northstar-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/northstar-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/northstar-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/northstar-js/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/northstar-js/languages","stargazers_url":"https://api.github.com/repos/DoSomething/northstar-js/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/northstar-js/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/northstar-js/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/northstar-js/subscription","commits_url":"https://api.github.com/repos/DoSomething/northstar-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/northstar-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/northstar-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/northstar-js/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/northstar-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/northstar-js/merges","archive_url":"https://api.github.com/repos/DoSomething/northstar-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/northstar-js/downloads","issues_url":"https://api.github.com/repos/DoSomething/northstar-js/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/northstar-js/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/northstar-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/northstar-js/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/northstar-js/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/northstar-js/deployments","created_at":"2016-05-24T14:03:59Z","updated_at":"2016-05-25T16:17:23Z","pushed_at":"2016-09-19T19:34:47Z","git_url":"git://github.com/DoSomething/northstar-js.git","ssh_url":"git@github.com:DoSomething/northstar-js.git","clone_url":"https://github.com/DoSomething/northstar-js.git","svn_url":"https://github.com/DoSomething/northstar-js","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"DoSomething:master","ref":"master","sha":"ebb39bb63daa083541f67804abd1975458f56da4","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":59578414,"name":"northstar-js","full_name":"DoSomething/northstar-js","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/northstar-js","description":"Node.js client for Northstar, the DoSomething.org user API.","fork":false,"url":"https://api.github.com/repos/DoSomething/northstar-js","forks_url":"https://api.github.com/repos/DoSomething/northstar-js/forks","keys_url":"https://api.github.com/repos/DoSomething/northstar-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/northstar-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/northstar-js/teams","hooks_url":"https://api.github.com/repos/DoSomething/northstar-js/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/northstar-js/events","assignees_url":"https://api.github.com/repos/DoSomething/northstar-js/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/northstar-js/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/northstar-js/tags","blobs_url":"https://api.github.com/repos/DoSomething/northstar-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/northstar-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/northstar-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/northstar-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/northstar-js/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/northstar-js/languages","stargazers_url":"https://api.github.com/repos/DoSomething/northstar-js/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/northstar-js/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/northstar-js/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/northstar-js/subscription","commits_url":"https://api.github.com/repos/DoSomething/northstar-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/northstar-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/northstar-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/northstar-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/northstar-js/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/northstar-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/northstar-js/merges","archive_url":"https://api.github.com/repos/DoSomething/northstar-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/northstar-js/downloads","issues_url":"https://api.github.com/repos/DoSomething/northstar-js/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/northstar-js/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/northstar-js/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/northstar-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/northstar-js/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/northstar-js/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/northstar-js/deployments","created_at":"2016-05-24T14:03:59Z","updated_at":"2016-05-25T16:17:23Z","pushed_at":"2016-09-19T19:34:47Z","git_url":"git://github.com/DoSomething/northstar-js.git","ssh_url":"git@github.com:DoSomething/northstar-js.git","clone_url":"https://github.com/DoSomething/northstar-js.git","svn_url":"https://github.com/DoSomething/northstar-js","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19"},"html":{"href":"https://github.com/DoSomething/northstar-js/pull/19"},"issue":{"href":"https://api.github.com/repos/DoSomething/northstar-js/issues/19"},"comments":{"href":"https://api.github.com/repos/DoSomething/northstar-js/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/northstar-js/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/northstar-js/statuses/35522f2056b2bae2033b8c6bbccd9f1a22706e83"}}}}
{"actor":{"display_login":"aaronschachter"}}