douhu4692 2016-08-11 07:47 采纳率: 100%
浏览 41
已采纳

如何检索Google Calendar Resources PHP API客户端?

How fetch google calendar resource using php-client I found same question here , I did not get any help from answer.

Can there is get all resource from google calendar of my company using download google admin sdk PHP

I could not get any sample or method into this lib how to get all resources like rooms. There is any way to fetch resource from company google calendar.

  • 写回答

1条回答 默认 最新

  • dsf5989 2016-08-11 13:16
    关注

    Here is solution

    $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);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥25 关于##爬虫##的问题,如何解决?:
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误