From d3132c1a50d477ea84f851ef52360f949fc6180c Mon Sep 17 00:00:00 2001 From: Duncan Rumbold Date: Wed, 31 May 2017 13:40:37 +1200 Subject: [PATCH] Update Mailchimp API version to 3.0. --- examples/mailchimp.php | 2 +- src/OAuth/OAuth2/Service/Mailchimp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mailchimp.php b/examples/mailchimp.php index dd7e12bd..8c2a61be 100644 --- a/examples/mailchimp.php +++ b/examples/mailchimp.php @@ -41,7 +41,7 @@ $token = $mailchimpService->requestAccessToken($_GET['code']); // Send a request with it - $result = $mailchimpService->request('/users/profile.json'); + $result = $mailchimpService->request('/'); header('Content-Type: application/json'); echo $result; exit; diff --git a/src/OAuth/OAuth2/Service/Mailchimp.php b/src/OAuth/OAuth2/Service/Mailchimp.php index 842153de..98d63547 100644 --- a/src/OAuth/OAuth2/Service/Mailchimp.php +++ b/src/OAuth/OAuth2/Service/Mailchimp.php @@ -106,7 +106,7 @@ protected function setBaseApiUri(StdOAuth2Token $token) $meta = json_decode($response, true); // Set base api uri. - $this->baseApiUri = new Uri('https://'. $meta['dc'] .'.api.mailchimp.com/2.0/'); + $this->baseApiUri = new Uri('https://'. $meta['dc'] .'.api.mailchimp.com/3.0/'); // Allow chaining. return $this;