ispapi-apiconnector
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "ispapi-apiconnector", | ||
"description": "1API API Connector for node.js", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Kai Schwarz", |
@@ -14,3 +14,4 @@ # ISPAPI-APICONNECTOR | ||
var apiconnector = require('ispapi-connector') | ||
, api = apiconnector.Client(); | ||
, api = apiconnector.Client() | ||
, c; | ||
@@ -33,4 +34,4 @@ //optional: set client remote address including remote port, e.g.: | ||
//request result of an api command | ||
api.request({ | ||
//create connection instance to work with | ||
c = api.createConnection({ | ||
COMMAND : "StatusUser" | ||
@@ -40,3 +41,3 @@ }); | ||
//output api response when ready | ||
api.once("response", function(r){ | ||
c.once("response", function(r){ | ||
console.dir(r.as_hash()); | ||
@@ -46,5 +47,9 @@ }); | ||
//react on error events | ||
api.on("error", function(e){ | ||
c.on("error", function(e){ | ||
console.log(e.message); | ||
}); | ||
//perform the request | ||
c.request(); | ||
``` | ||
@@ -51,0 +56,0 @@ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
20127
58