【问题标题】:nodejs client for google resource calendar APIs谷歌资源日历 API 的 nodejs 客户端
【发布时间】:2018-09-15 05:25:14
【问题描述】:

我正在开发一个功能,我需要获取有关被视为资源日历的会议室的信息。我将 googleapis node js client 用于其他与日历相关的 API,例如事件列表,插入。我无法在 googleapis 库中找到任何方法来从资源日历中获取数据,这是 google admin SDK 的一部分。是否有用于资源日历 API 的 NodeJS 客户端?或者任何其他方式来调用这些 API?

【问题讨论】:

  • 首先,您可以使用documentation 中提供的代码创建一个简单的Node.js 命令行应用程序,该应用程序向Google Calendar API 发出请求。需要的方法可以使用Events: insert提供的代码。
  • 我已经使用 NodeJS 编写了一个应用程序,它为我提供了所有日历事件,可以创建事件。我正在努力解决的是日历资源 API。日历资源用于存储会议室等。我找不到该特定功能的 api 客户端。

标签: node.js google-calendar-api google-admin-sdk google-api-nodejs-client


【解决方案1】:

我在做同样类型的应用,在资源部分也被屏蔽了。

似乎所有资源都可以通过Directory API 访问。

import { google } from 'googleapis';

var service = google.admin('directory_v1');
service.resources.calendars.list();

您需要在 de Google Developper Console 中激活 Admin SDK。

我想连接一个管理员帐户。

这很愚蠢,因为作为普通用户,您可以看到日历房间等资源。

【讨论】:

    猜你喜欢
    • 2014-01-20
    • 1970-01-01
    • 2016-01-03
    • 2016-03-22
    • 2016-12-17
    • 2016-09-30
    • 2012-12-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多