I'm trying to fetch the available event colors for a calendar, and I'm getting this error:
PHP Fatal error: Call to undefined method Google_Service_Calendar_Colors_Resource::getEvent()
From the last line of this code:
$client = new Google_Client();
$client->setClientId($configArray['google']['calsync']['client_id']);
$client->setClientSecret($configArray['google']['calsync']['client_secret']);
$client->setRedirectUri($configArray['google']['calsync']['redirect_uri']);
$client->setUseBatch(true);
$client->setScopes('calendar');
$client->setAccessToken("ACCESSTOKEN");
$cal_client = new Google_Service_Calendar($client);
$colors = $cal_client->colors->get();
$event_colors = $colors->getEvent();
Why is this happening? What can I do to catch this error? I'm following the example used on: https://developers.google.com/google-apps/calendar/v3/reference/colors/get