eh-api-client
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -26,2 +26,3 @@ var | ||
options = options || {}; | ||
this._options = options; | ||
this.lockUUID = options.lockUUID; | ||
@@ -32,2 +33,8 @@ this.internalAuth = options.internalAuth; | ||
Client.prototype.fork = function(subUrl) { | ||
apiURL = this.apiURL + subUrl; | ||
var newClient = new Client(apiURL, this._options); | ||
return newClient; | ||
}; | ||
Client.prototype.request = function(method, options, body, cb) { | ||
@@ -34,0 +41,0 @@ if(typeof body === "function") { |
{ | ||
"name": "eh-api-client", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Node.js rest client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -73,2 +73,7 @@ var | ||
}); | ||
it("should fork client", function() { | ||
var fork = client.fork("/sub/url"); | ||
fork.apiURL.should.equal(client.apiURL + "/sub/url"); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8407
311