I have to update the google/apiclient
package 1.0.*@dev
to ^2.2
.
I had this code in version 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);
How can I replace this code for version 2.2?
The following code is from my sample project Oauth2Authentication.php