lib/google-apis/auth-client.js
function RequestHandler(config, logger) {
  this._request = commonDiag.utils.authorizedRequestFactory(SCOPES, {
    keyFile: config.getKeyFilename(),
    credentials: config.getCredentials()
  });
  this._config = config;
  this._logger = logger;
}
function RequestHandler(config, logger) {
  this._request = commonDiag.utils.authorizedRequestFactory(SCOPES, {
    keyFile: config.getKeyFilename(),
    credentials: config.getCredentials()
  });
  this._config = config;
  this._logger = logger;
}
function RequestHandler ( config , logger ) { this . _request = commonDiag . utils . authorizedRequestFactory ( SCOPES , { keyFile : config . getKeyFilename ( ) , credentials : config . getCredentials ( ) } ) ; this . _config = config ; this . _logger = logger ; }
The RequestHandler constructor initializes several properties on the
RequestHandler instance and create a new request factory for requesting
against the Error Reporting API.
@param {Configuration} config - The configuration instance
@param {Object} logger - the logger instance
@class RequestHandler
@classdesc The RequestHandler class provides a centralized way of managing a
pool of ongoing requests and routing there callback execution to the right
handlers. The RequestHandler relies on the diag-common request factory
and therefore only manages the routing of execution to the proper callback
and does not do any queueing/batching. The RequestHandler instance has
several properties: the projectId property is used to create a correct url
for interacting with the API and key property can be optionally provided a
value which can be used in place of default application authentication. The
shouldReportErrors property will dictate whether or not the handler instance
will attempt to send payloads to the API. If it is false the handler will
immediately call back to the completion callback with a constant error value.
@property {Function} _request - a npm.im/request style request function that
provides the transport layer for requesting against the Error Reporting API.
It includes retry and authorization logic.
@property {String} _projectId - the project id used to uniquely identify and
address the correct project in the Error Reporting API
@property {Object} _logger - the instance-cached logger instance
The RequestHandler constructor initializes several properties on the RequestHandler instance and create a new request factory for requesting against the Error Reporting API .