node-axosoft
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -75,2 +75,20 @@ var _ = require('lodash'); | ||
/** | ||
* Gets the API version info for the Axosoft account | ||
* | ||
* @param function callback Callback function. | ||
*/ | ||
function getVersion(callback) { | ||
rest.get(_base_url + '/api/version') | ||
.on('complete', function (data, response) { | ||
if (response && (response.statusCode === 200 || response.statusCode === 201)) { | ||
callback(null, data); | ||
} else { | ||
// if the URL isn't a valid Axosoft url, there is no response, and data is the Error | ||
callback(data); | ||
} | ||
}); | ||
} | ||
/** | ||
* Wrapper for REST requests. | ||
@@ -221,2 +239,3 @@ * Validate credentials before making any request, then dynamically | ||
exports.register = register; | ||
exports.getVersion = getVersion; | ||
exports.handleRestRequest = handleRestRequest; | ||
@@ -223,0 +242,0 @@ exports.getLoginUrl = getLoginUrl; |
{ | ||
"name": "node-axosoft", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A node.js client for accessing the Axosoft API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
96096
1746
1