{"action":"created","comment":{"url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/comments/60735457","id":60735457,"diff_hunk":"@@ -140,6 +141,12 @@ private function buildUrl($resourcePath, $options) {\n     }\n \n     if( !empty($options['query'])) {\n+      foreach($options['query'] as &$element) {\n+        if(is_array($element)) {","path":"lib/SparkPost/APIResource.php","position":15,"original_position":15,"commit_id":"25efba5e57f3e3c0e529248493d9ba518bfca6a6","original_commit_id":"25efba5e57f3e3c0e529248493d9ba518bfca6a6","user":{"login":"beardyman","id":4459303,"avatar_url":"https://avatars.githubusercontent.com/u/4459303?v=3","gravatar_id":"","url":"https://api.github.com/users/beardyman","html_url":"https://github.com/beardyman","followers_url":"https://api.github.com/users/beardyman/followers","following_url":"https://api.github.com/users/beardyman/following{/other_user}","gists_url":"https://api.github.com/users/beardyman/gists{/gist_id}","starred_url":"https://api.github.com/users/beardyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardyman/subscriptions","organizations_url":"https://api.github.com/users/beardyman/orgs","repos_url":"https://api.github.com/users/beardyman/repos","events_url":"https://api.github.com/users/beardyman/events{/privacy}","received_events_url":"https://api.github.com/users/beardyman/received_events","type":"User","site_admin":false},"body":"I would add a comment here explaining that its supporting lists in query params","created_at":"2016-04-22T13:07:25Z","updated_at":"2016-04-22T13:07:25Z","html_url":"https://github.com/SparkPost/php-sparkpost/pull/69#discussion_r60735457","pull_request_url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/comments/60735457"},"html":{"href":"https://github.com/SparkPost/php-sparkpost/pull/69#discussion_r60735457"},"pull_request":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69","id":65209430,"html_url":"https://github.com/SparkPost/php-sparkpost/pull/69","diff_url":"https://github.com/SparkPost/php-sparkpost/pull/69.diff","patch_url":"https://github.com/SparkPost/php-sparkpost/pull/69.patch","issue_url":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/69","number":69,"state":"open","locked":false,"title":"Message Events","user":{"login":"j4m3s","id":1998995,"avatar_url":"https://avatars.githubusercontent.com/u/1998995?v=3","gravatar_id":"","url":"https://api.github.com/users/j4m3s","html_url":"https://github.com/j4m3s","followers_url":"https://api.github.com/users/j4m3s/followers","following_url":"https://api.github.com/users/j4m3s/following{/other_user}","gists_url":"https://api.github.com/users/j4m3s/gists{/gist_id}","starred_url":"https://api.github.com/users/j4m3s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j4m3s/subscriptions","organizations_url":"https://api.github.com/users/j4m3s/orgs","repos_url":"https://api.github.com/users/j4m3s/repos","events_url":"https://api.github.com/users/j4m3s/events{/privacy}","received_events_url":"https://api.github.com/users/j4m3s/received_events","type":"User","site_admin":false},"body":"I've implemented the Message Events functionality, trying to keep to the same style of unit tests etc.  There are a couple of points of note/ for discussion:\r\n  1. The Message Events API accepts a comma-separated list of values for each query parameter.  Given that it's potentially used elsewhere in the API, I added the implosion of an array query parameter in the base APIResource class (and augmented the unit tests to cover it).\r\n  2. For some reason the Message Events API takes a date-time in a different format to the Transmission API (without seconds or UTC offset).  Rather than making the user mess with formatting these differently for each API call I added code to format a passed-in `\\DateTime` object in each scenario.\r\n  3. I've run manual integration tests against my own API key.  I'm a bit nervous/ surprised that there are no automated integration tests in the pack, particularly given that there's a mock API available on the SparkPost API documentation.  Is there a case to be made for adding some integration tests to this repo?\r\n\r\nCloses #58 and #65 ","created_at":"2016-04-04T20:41:33Z","updated_at":"2016-04-22T13:07:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87744e4fae913f3b3a3bd6bee05b91415458fc5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69/commits","review_comments_url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69/comments","review_comment_url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/69/comments","statuses_url":"https://api.github.com/repos/SparkPost/php-sparkpost/statuses/25efba5e57f3e3c0e529248493d9ba518bfca6a6","head":{"label":"j4m3s:ISSUE-58","ref":"ISSUE-58","sha":"25efba5e57f3e3c0e529248493d9ba518bfca6a6","user":{"login":"j4m3s","id":1998995,"avatar_url":"https://avatars.githubusercontent.com/u/1998995?v=3","gravatar_id":"","url":"https://api.github.com/users/j4m3s","html_url":"https://github.com/j4m3s","followers_url":"https://api.github.com/users/j4m3s/followers","following_url":"https://api.github.com/users/j4m3s/following{/other_user}","gists_url":"https://api.github.com/users/j4m3s/gists{/gist_id}","starred_url":"https://api.github.com/users/j4m3s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j4m3s/subscriptions","organizations_url":"https://api.github.com/users/j4m3s/orgs","repos_url":"https://api.github.com/users/j4m3s/repos","events_url":"https://api.github.com/users/j4m3s/events{/privacy}","received_events_url":"https://api.github.com/users/j4m3s/received_events","type":"User","site_admin":false},"repo":{"id":52826662,"name":"php-sparkpost","full_name":"j4m3s/php-sparkpost","owner":{"login":"j4m3s","id":1998995,"avatar_url":"https://avatars.githubusercontent.com/u/1998995?v=3","gravatar_id":"","url":"https://api.github.com/users/j4m3s","html_url":"https://github.com/j4m3s","followers_url":"https://api.github.com/users/j4m3s/followers","following_url":"https://api.github.com/users/j4m3s/following{/other_user}","gists_url":"https://api.github.com/users/j4m3s/gists{/gist_id}","starred_url":"https://api.github.com/users/j4m3s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j4m3s/subscriptions","organizations_url":"https://api.github.com/users/j4m3s/orgs","repos_url":"https://api.github.com/users/j4m3s/repos","events_url":"https://api.github.com/users/j4m3s/events{/privacy}","received_events_url":"https://api.github.com/users/j4m3s/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/j4m3s/php-sparkpost","description":"SparkPost client library for PHP","fork":true,"url":"https://api.github.com/repos/j4m3s/php-sparkpost","forks_url":"https://api.github.com/repos/j4m3s/php-sparkpost/forks","keys_url":"https://api.github.com/repos/j4m3s/php-sparkpost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/j4m3s/php-sparkpost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/j4m3s/php-sparkpost/teams","hooks_url":"https://api.github.com/repos/j4m3s/php-sparkpost/hooks","issue_events_url":"https://api.github.com/repos/j4m3s/php-sparkpost/issues/events{/number}","events_url":"https://api.github.com/repos/j4m3s/php-sparkpost/events","assignees_url":"https://api.github.com/repos/j4m3s/php-sparkpost/assignees{/user}","branches_url":"https://api.github.com/repos/j4m3s/php-sparkpost/branches{/branch}","tags_url":"https://api.github.com/repos/j4m3s/php-sparkpost/tags","blobs_url":"https://api.github.com/repos/j4m3s/php-sparkpost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/j4m3s/php-sparkpost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/j4m3s/php-sparkpost/git/refs{/sha}","trees_url":"https://api.github.com/repos/j4m3s/php-sparkpost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/j4m3s/php-sparkpost/statuses/{sha}","languages_url":"https://api.github.com/repos/j4m3s/php-sparkpost/languages","stargazers_url":"https://api.github.com/repos/j4m3s/php-sparkpost/stargazers","contributors_url":"https://api.github.com/repos/j4m3s/php-sparkpost/contributors","subscribers_url":"https://api.github.com/repos/j4m3s/php-sparkpost/subscribers","subscription_url":"https://api.github.com/repos/j4m3s/php-sparkpost/subscription","commits_url":"https://api.github.com/repos/j4m3s/php-sparkpost/commits{/sha}","git_commits_url":"https://api.github.com/repos/j4m3s/php-sparkpost/git/commits{/sha}","comments_url":"https://api.github.com/repos/j4m3s/php-sparkpost/comments{/number}","issue_comment_url":"https://api.github.com/repos/j4m3s/php-sparkpost/issues/comments{/number}","contents_url":"https://api.github.com/repos/j4m3s/php-sparkpost/contents/{+path}","compare_url":"https://api.github.com/repos/j4m3s/php-sparkpost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/j4m3s/php-sparkpost/merges","archive_url":"https://api.github.com/repos/j4m3s/php-sparkpost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/j4m3s/php-sparkpost/downloads","issues_url":"https://api.github.com/repos/j4m3s/php-sparkpost/issues{/number}","pulls_url":"https://api.github.com/repos/j4m3s/php-sparkpost/pulls{/number}","milestones_url":"https://api.github.com/repos/j4m3s/php-sparkpost/milestones{/number}","notifications_url":"https://api.github.com/repos/j4m3s/php-sparkpost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/j4m3s/php-sparkpost/labels{/name}","releases_url":"https://api.github.com/repos/j4m3s/php-sparkpost/releases{/id}","deployments_url":"https://api.github.com/repos/j4m3s/php-sparkpost/deployments","created_at":"2016-02-29T21:38:49Z","updated_at":"2016-02-29T21:38:50Z","pushed_at":"2016-04-04T22:31:40Z","git_url":"git://github.com/j4m3s/php-sparkpost.git","ssh_url":"git@github.com:j4m3s/php-sparkpost.git","clone_url":"https://github.com/j4m3s/php-sparkpost.git","svn_url":"https://github.com/j4m3s/php-sparkpost","homepage":"https://www.sparkpost.com/","size":213,"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":"master"}},"base":{"label":"SparkPost:master","ref":"master","sha":"acb590ef2cdda14900016364f2903200846fe8db","user":{"login":"SparkPost","id":9406778,"avatar_url":"https://avatars.githubusercontent.com/u/9406778?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkPost","html_url":"https://github.com/SparkPost","followers_url":"https://api.github.com/users/SparkPost/followers","following_url":"https://api.github.com/users/SparkPost/following{/other_user}","gists_url":"https://api.github.com/users/SparkPost/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkPost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkPost/subscriptions","organizations_url":"https://api.github.com/users/SparkPost/orgs","repos_url":"https://api.github.com/users/SparkPost/repos","events_url":"https://api.github.com/users/SparkPost/events{/privacy}","received_events_url":"https://api.github.com/users/SparkPost/received_events","type":"Organization","site_admin":false},"repo":{"id":25306898,"name":"php-sparkpost","full_name":"SparkPost/php-sparkpost","owner":{"login":"SparkPost","id":9406778,"avatar_url":"https://avatars.githubusercontent.com/u/9406778?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkPost","html_url":"https://github.com/SparkPost","followers_url":"https://api.github.com/users/SparkPost/followers","following_url":"https://api.github.com/users/SparkPost/following{/other_user}","gists_url":"https://api.github.com/users/SparkPost/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkPost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkPost/subscriptions","organizations_url":"https://api.github.com/users/SparkPost/orgs","repos_url":"https://api.github.com/users/SparkPost/repos","events_url":"https://api.github.com/users/SparkPost/events{/privacy}","received_events_url":"https://api.github.com/users/SparkPost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SparkPost/php-sparkpost","description":"SparkPost client library for PHP","fork":false,"url":"https://api.github.com/repos/SparkPost/php-sparkpost","forks_url":"https://api.github.com/repos/SparkPost/php-sparkpost/forks","keys_url":"https://api.github.com/repos/SparkPost/php-sparkpost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SparkPost/php-sparkpost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SparkPost/php-sparkpost/teams","hooks_url":"https://api.github.com/repos/SparkPost/php-sparkpost/hooks","issue_events_url":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/events{/number}","events_url":"https://api.github.com/repos/SparkPost/php-sparkpost/events","assignees_url":"https://api.github.com/repos/SparkPost/php-sparkpost/assignees{/user}","branches_url":"https://api.github.com/repos/SparkPost/php-sparkpost/branches{/branch}","tags_url":"https://api.github.com/repos/SparkPost/php-sparkpost/tags","blobs_url":"https://api.github.com/repos/SparkPost/php-sparkpost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SparkPost/php-sparkpost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SparkPost/php-sparkpost/git/refs{/sha}","trees_url":"https://api.github.com/repos/SparkPost/php-sparkpost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SparkPost/php-sparkpost/statuses/{sha}","languages_url":"https://api.github.com/repos/SparkPost/php-sparkpost/languages","stargazers_url":"https://api.github.com/repos/SparkPost/php-sparkpost/stargazers","contributors_url":"https://api.github.com/repos/SparkPost/php-sparkpost/contributors","subscribers_url":"https://api.github.com/repos/SparkPost/php-sparkpost/subscribers","subscription_url":"https://api.github.com/repos/SparkPost/php-sparkpost/subscription","commits_url":"https://api.github.com/repos/SparkPost/php-sparkpost/commits{/sha}","git_commits_url":"https://api.github.com/repos/SparkPost/php-sparkpost/git/commits{/sha}","comments_url":"https://api.github.com/repos/SparkPost/php-sparkpost/comments{/number}","issue_comment_url":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/comments{/number}","contents_url":"https://api.github.com/repos/SparkPost/php-sparkpost/contents/{+path}","compare_url":"https://api.github.com/repos/SparkPost/php-sparkpost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SparkPost/php-sparkpost/merges","archive_url":"https://api.github.com/repos/SparkPost/php-sparkpost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SparkPost/php-sparkpost/downloads","issues_url":"https://api.github.com/repos/SparkPost/php-sparkpost/issues{/number}","pulls_url":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls{/number}","milestones_url":"https://api.github.com/repos/SparkPost/php-sparkpost/milestones{/number}","notifications_url":"https://api.github.com/repos/SparkPost/php-sparkpost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SparkPost/php-sparkpost/labels{/name}","releases_url":"https://api.github.com/repos/SparkPost/php-sparkpost/releases{/id}","deployments_url":"https://api.github.com/repos/SparkPost/php-sparkpost/deployments","created_at":"2014-10-16T14:47:44Z","updated_at":"2016-04-22T12:26:48Z","pushed_at":"2016-04-21T21:48:45Z","git_url":"git://github.com/SparkPost/php-sparkpost.git","ssh_url":"git@github.com:SparkPost/php-sparkpost.git","clone_url":"https://github.com/SparkPost/php-sparkpost.git","svn_url":"https://github.com/SparkPost/php-sparkpost","homepage":"https://www.sparkpost.com/","size":278,"stargazers_count":54,"watchers_count":54,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":19,"forks":19,"open_issues":19,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69"},"html":{"href":"https://github.com/SparkPost/php-sparkpost/pull/69"},"issue":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/69"},"comments":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/SparkPost/php-sparkpost/statuses/25efba5e57f3e3c0e529248493d9ba518bfca6a6"}}}}