Socket
Socket
Sign inDemoInstall

googleapis

Package Overview
Dependencies
Maintainers
1
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

googleapis - npm Package Compare versions

Comparing version 0.2.5-alpha to 0.2.6-alpha

23

lib/googleapis.js

@@ -22,3 +22,4 @@ /**

qs = require('querystring'),
requests = require('./requests.js');
requests = require('./requests.js'),
fs = require('fs');

@@ -136,2 +137,7 @@ /**

if (api.opts && api.opts.localDiscoveryFilePath) {
that.loadFromFile(api.opts.localDiscoveryFilePath, opt_callback);
return;
}
var generateClient = function(err, data) {

@@ -157,2 +163,17 @@ var client = null;

/**
* Generates a client from a local discovery file.
* @param {String} filename Path of the local discovery file.
* @param {Function=} opt_callback Optional callback function.
*/
GoogleApis.prototype.loadFromFile = function(filename, opt_callback) {
fs.readFile(filename, function(err, data) {
var client = null;
if (!err && data) {
client = new Client(JSON.parse(data));
}
opt_callback && opt_callback(err, client);
});
}
/**
* Generates the discovery url.

@@ -159,0 +180,0 @@ * @param {String} api An object to represent the api name, version and opts.

2

package.json
{
"name": "googleapis",
"version": "0.2.5-alpha",
"version": "0.2.6-alpha",
"author": "Google Inc.",

@@ -5,0 +5,0 @@ "description": "Google APIs Client Library for Node.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc