我必须将google/apiclient
包更新1.0.*@dev
为^2.2
.
我在 1.0 版中有这个代码:
$this->_client = new Google_Client();
$this->_client->setAssertionCredentials(new Google_Auth_AssertionCredentials(
'__ACCOUNT__',
["https://www.googleapis.com/auth/analytics.readonly"],
file_get_contents('__PATH_TO_KEY__'))
);
$this->_client->setClientId('__CLIENT_ID__');
$this->_analytics = new Google_Service_Analytics($this->_client);
如何替换 2.2 版的此代码?