@goongmaps/goong-sdk
Version:
A Javascript SDK working with Goong REST APIs
28 lines (22 loc) • 658 B
JavaScript
;
var node = require('./node-layer');
var GAPIClient = require('../classes/gapi-client');
function NodeClient(options) {
GAPIClient.call(this, options);
}
NodeClient.prototype = Object.create(GAPIClient.prototype);
NodeClient.prototype.constructor = NodeClient;
NodeClient.prototype.sendRequest = node.nodeSend;
NodeClient.prototype.abortRequest = node.nodeAbort;
/**
* Create a client for Node.
*
* @param {Object} options
* @param {string} options.accessToken
* @param {string} [options.origin]
* @returns {GAPIClient}
*/
function createNodeClient(options) {
return new NodeClient(options);
}
module.exports = createNodeClient;