Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any Google API library for Node.js?

Is there a Node.js library that covers all of Google's APIs into a single API? (Google Contacts, Google Calendar, Google Geolocations API, etc.)

like image 388
Olivier Lalonde Avatar asked Nov 28 '12 04:11

Olivier Lalonde


1 Answers

Note: I'm the author of googleapis module.

Google released an officially supported node client library for its APIs. https://github.com/google/google-api-nodejs-client It's also available on npm:

npm install googleapis

Load an API with its handle and version, then make requests:

googleapis.discover('urlshortener', 'v1').execute(function(err, client) {
  // make requests here
  client.urlshortener.url.get({ shortUrl: 'http://goo.gl/DdUKX' }).execute(console.log);
});

It also supports batch requests and OAuth 2.0.

like image 95
Burcu Dogan Avatar answered Oct 11 '22 13:10

Burcu Dogan