2016-08-11 7 views
0

php-client I found same question hereを使用してGoogleカレンダーリソースを取得するには、私は答えから何の助けも得ていませんでした。GoogleカレンダーリソースPHP APIクライアントを取得するにはどうすればよいですか?

は、私は部屋のようなすべてのリソースを取得する方法このLIBに任意のサンプルやメソッドを取得できませんでしたdownload google admin sdk PHP

を使用して、私の会社のGoogleカレンダーからのすべてのリソースを取得していることができます。企業のGoogleカレンダーからリソースを取得する方法はあります。ここで

答えて

1

は解決

$client = new \Google_Client(); 
$client->useApplicationDefaultCredentials(); 
$client->setScopes(['https://www.googleapis.com/auth/admin.directory.resource.calendar','https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly']); 
$client->setSubject('[email protected]'); 
$directoryService = new \Google_Service_Directory($client); 

$resources = $directoryService->resources_calendars->listResourcesCalendars('my_customer')->getItems(); 

var_dump($resources); 
ある
関連する問題