【问题标题】:How do I retrieve Google Calendar Resources PHP API client?如何检索 Google 日历资源 PHP API 客户端?
【发布时间】:2016-12-17 20:04:15
【问题描述】:

如何使用 php-client I found same question here 获取谷歌日历资源,我没有得到任何帮助。

可以使用download google admin sdk PHP 从我公司的谷歌日历获取所有资源

我无法在这个库中获取任何示例或方法,如何获取房间等所有资源。有任何方法可以从公司谷歌日历中获取资源。

【问题讨论】:

    标签: php google-admin-sdk


    【解决方案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('user@domain.com');
    $directoryService = new \Google_Service_Directory($client);
    
    $resources = $directoryService->resources_calendars->listResourcesCalendars('my_customer')->getItems();
    
    var_dump($resources);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-01
      • 2015-04-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多