{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/53679059","id":53679059,"diff_hunk":"@@ -1026,3 +1039,29 @@ function dosomething_signup_get_target_nid_for_source($source_string) {\n   }\n   return NULL;\n }\n+\n+/**\n+ * Build the Guzzle HTTP Client to make requests to Gladiator.\n+ *\n+ * https://github.com/DoSomething/gladiator\n+ * @TODO - use correct URL\n+ */\n+function _dosomething_signup_build_http_client() {\n+  $base_url = 'http://jsonplaceholder.typicode.com';\n+\n+  if (libraries_load('guzzle') == TRUE) {\n+    $client = new GuzzleHttp\\Client(array(\n+      'base_uri' => 'http://jsonplaceholder.typicode.com',\n+      'defaults' => array(\n+        'headers' => array(\n+          'Content-Type' => 'application/json',\n+          'Accept' => 'application/json'\n+          ),\n+        ),\n+    ));\n+\n+    return $client;\n+  }\n+\n+  return;","path":"lib/modules/dosomething/dosomething_signup/dosomething_signup.module","position":48,"original_position":48,"commit_id":"aee72e70dcf8778743769a6ea9b7fcda56404022","original_commit_id":"7bc49fd3447fe12efdbeafe3ff549a300f9d776d","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"body":"I believe, when you don't specify a parameter, php returns NULL by default. \r\n\r\n> Note: If no parameter is supplied, then the parentheses must be omitted and NULL will be returned. Calling return with parentheses but with no arguments will result in a parse error.\r\n\r\nhttp://php.net/manual/en/function.return.php\r\n","created_at":"2016-02-22T19:35:58Z","updated_at":"2016-02-22T19:35:58Z","html_url":"https://github.com/DoSomething/phoenix/pull/6201#discussion_r53679059","pull_request_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/53679059"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/6201#discussion_r53679059"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201","id":60224971,"html_url":"https://github.com/DoSomething/phoenix/pull/6201","diff_url":"https://github.com/DoSomething/phoenix/pull/6201.diff","patch_url":"https://github.com/DoSomething/phoenix/pull/6201.patch","issue_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6201","number":6201,"state":"open","locked":false,"title":"Forward to gladiator","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\n\r\nThis PR starts the work of sending users to [gladiator](https://github.com/DoSomething/gladiator) when they sign up for a competition using the sign up data form. \r\n\r\nI didn't have the endpoint that we are actually going to be using in gladiator, so this uses a fake endpoint, but flushes out the basic logic that we will be using to do this work. \r\n\r\n#### How should this be manually tested?\r\n\r\nThis is isn't fully functional yet, but if you pull down this branch and then run\r\n\r\n`drush eval 'dosomething_signup_send_user_to_gladiator('user', 'values')'` you shouldn't see any errors pop back. Also, you should be able to submit a sign up data form, that is configured to be a competition sign up, without any issues.\r\n\r\n#### Any background context you want to provide?\r\n\r\nThere was a previous issue with Guzzle working in Phoenix ( #4616 ) But I believe that was an issue because the guzzle client was being configured incorrectly. See that issue for deets.\r\n\r\n#### What are the relevant tickets?\r\n\r\nAddresses #6170 \r\n\r\ncc @weerd ","created_at":"2016-02-22T19:18:03Z","updated_at":"2016-02-22T19:35:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c141d48f010a00cb1ad7765cb6a503f72558957","assignee":{"login":"angaither","id":645205,"avatar_url":"https://avatars.githubusercontent.com/u/645205?v=3","gravatar_id":"","url":"https://api.github.com/users/angaither","html_url":"https://github.com/angaither","followers_url":"https://api.github.com/users/angaither/followers","following_url":"https://api.github.com/users/angaither/following{/other_user}","gists_url":"https://api.github.com/users/angaither/gists{/gist_id}","starred_url":"https://api.github.com/users/angaither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angaither/subscriptions","organizations_url":"https://api.github.com/users/angaither/orgs","repos_url":"https://api.github.com/users/angaither/repos","events_url":"https://api.github.com/users/angaither/events{/privacy}","received_events_url":"https://api.github.com/users/angaither/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201/commits","review_comments_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201/comments","review_comment_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6201/comments","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/aee72e70dcf8778743769a6ea9b7fcda56404022","head":{"label":"sbsmith86:forward-to-gladiator","ref":"forward-to-gladiator","sha":"aee72e70dcf8778743769a6ea9b7fcda56404022","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"repo":{"id":25887312,"name":"dosomething","full_name":"sbsmith86/dosomething","owner":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbsmith86/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/sbsmith86/dosomething","forks_url":"https://api.github.com/repos/sbsmith86/dosomething/forks","keys_url":"https://api.github.com/repos/sbsmith86/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbsmith86/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbsmith86/dosomething/teams","hooks_url":"https://api.github.com/repos/sbsmith86/dosomething/hooks","issue_events_url":"https://api.github.com/repos/sbsmith86/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/sbsmith86/dosomething/events","assignees_url":"https://api.github.com/repos/sbsmith86/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/sbsmith86/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/sbsmith86/dosomething/tags","blobs_url":"https://api.github.com/repos/sbsmith86/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbsmith86/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbsmith86/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbsmith86/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbsmith86/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/sbsmith86/dosomething/languages","stargazers_url":"https://api.github.com/repos/sbsmith86/dosomething/stargazers","contributors_url":"https://api.github.com/repos/sbsmith86/dosomething/contributors","subscribers_url":"https://api.github.com/repos/sbsmith86/dosomething/subscribers","subscription_url":"https://api.github.com/repos/sbsmith86/dosomething/subscription","commits_url":"https://api.github.com/repos/sbsmith86/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbsmith86/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbsmith86/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbsmith86/dosomething/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbsmith86/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/sbsmith86/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbsmith86/dosomething/merges","archive_url":"https://api.github.com/repos/sbsmith86/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbsmith86/dosomething/downloads","issues_url":"https://api.github.com/repos/sbsmith86/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/sbsmith86/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/sbsmith86/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/sbsmith86/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbsmith86/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/sbsmith86/dosomething/releases{/id}","deployments_url":"https://api.github.com/repos/sbsmith86/dosomething/deployments","created_at":"2014-10-28T19:53:11Z","updated_at":"2016-01-11T20:47:52Z","pushed_at":"2016-02-22T19:32:43Z","git_url":"git://github.com/sbsmith86/dosomething.git","ssh_url":"git@github.com:sbsmith86/dosomething.git","clone_url":"https://github.com/sbsmith86/dosomething.git","svn_url":"https://github.com/sbsmith86/dosomething","homepage":"http://www.dosomething.org/","size":16235,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"a7f7d143438c009079828d0a2c0a42b9f3856796","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":13592927,"name":"phoenix","full_name":"DoSomething/phoenix","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/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/phoenix","forks_url":"https://api.github.com/repos/DoSomething/phoenix/forks","keys_url":"https://api.github.com/repos/DoSomething/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/phoenix/teams","hooks_url":"https://api.github.com/repos/DoSomething/phoenix/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/phoenix/events","assignees_url":"https://api.github.com/repos/DoSomething/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/phoenix/tags","blobs_url":"https://api.github.com/repos/DoSomething/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/phoenix/languages","stargazers_url":"https://api.github.com/repos/DoSomething/phoenix/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/phoenix/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/phoenix/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/phoenix/subscription","commits_url":"https://api.github.com/repos/DoSomething/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/phoenix/merges","archive_url":"https://api.github.com/repos/DoSomething/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/phoenix/downloads","issues_url":"https://api.github.com/repos/DoSomething/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/phoenix/deployments","created_at":"2013-10-15T14:50:48Z","updated_at":"2016-01-11T18:53:47Z","pushed_at":"2016-02-22T19:32:44Z","git_url":"git://github.com/DoSomething/phoenix.git","ssh_url":"git@github.com:DoSomething/phoenix.git","clone_url":"https://github.com/DoSomething/phoenix.git","svn_url":"https://github.com/DoSomething/phoenix","homepage":"http://www.dosomething.org/","size":17023,"stargazers_count":28,"watchers_count":28,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":185,"forks":18,"open_issues":185,"watchers":28,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/6201"},"issue":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6201"},"comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6201/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6201/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/phoenix/statuses/aee72e70dcf8778743769a6ea9b7fcda56404022"}}}}