【发布时间】:2012-11-28 04:35:10
【问题描述】:
是否有一个 Node.js 库将 Google 的所有 API 包含在一个 API 中? (Google 通讯录、Google 日历、Google Geolocations API 等)
【问题讨论】:
标签: node.js google-api npm
是否有一个 Node.js 库将 Google 的所有 API 包含在一个 API 中? (Google 通讯录、Google 日历、Google Geolocations API 等)
【问题讨论】:
标签: node.js google-api npm
注意:我是googleapis模块的作者。
Google 为其 API 发布了官方支持的节点客户端库。 https://github.com/google/google-api-nodejs-client npm 也有:
npm install googleapis
加载带有句柄和版本的 API,然后发出请求:
googleapis.discover('urlshortener', 'v1').execute(function(err, client) {
// make requests here
client.urlshortener.url.get({ shortUrl: 'http://goo.gl/DdUKX' }).execute(console.log);
});
它还支持批量请求和 OAuth 2.0。
【讨论】:
我没有尝试过,但通过 npmjs.org 搜索找到了它:https://npmjs.org/
【讨论】:
Temboo SDK 可用于 Node.js,并提供一种访问大量 Google API 的统一方式:
请参阅https://live.temboo.com/library/Library/Google/ -- SDK 是一个开放下载,但您需要一个(免费)Temboo 帐户才能使用它。
(完全披露:我在 Temboo 工作。)
【讨论】: