New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

m2x

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m2x - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

26

lib/devices.js

@@ -476,6 +476,13 @@ "use strict";

// https://m2x.att.com/developer/documentation/v2/commands#Device-Marks-a-Command-as-Processed
Devices.prototype.processCommand = function(id, commandId, callback) {
Devices.prototype.processCommand = function(id, commandId, params, callback) {
if (typeof params === "function") {
callback = params;
params = {};
}
return this.client.post(
helpers.url("/devices/%s/commands/%s/process", id, commandId),
callback);
helpers.url("/devices/%s/commands/%s/process", id, commandId), {
headers: { "Content-Type": "application/json" },
params: params
}, callback);
};

@@ -486,6 +493,13 @@

// https://m2x.att.com/developer/documentation/v2/commands#Device-Marks-a-Command-as-Rejected
Devices.prototype.rejectCommand = function(id, commandId, callback) {
Devices.prototype.rejectCommand = function(id, commandId, params, callback) {
if (typeof params === "function") {
callback = params;
params = {};
}
return this.client.post(
helpers.url("/devices/%s/commands/%s/reject", id, commandId),
callback);
helpers.url("/devices/%s/commands/%s/reject", id, commandId), {
headers: { "Content-Type": "application/json" },
params: params
}, callback);
};

@@ -492,0 +506,0 @@

{
"name": "m2x",
"version": "3.1.0",
"version": "3.1.1",
"description": "AT&T M2X API client for node.js",

@@ -5,0 +5,0 @@ "main": "./lib/m2x",

@@ -31,4 +31,7 @@ #!/usr/bin/env node

client.devices.reject_command("60c67603c68bac709c15568eb04ff0c9", "201512bf5313b6f939eb0c3d55a570906d1975",function(response) {
console.log(response.status);
client.commands.view("201512e91716a82c3087227d57b7217d0966d2", function(response) {
console.log(response.json.deliveries["9169303d7066ccbe880998ab124e70f6"]);
});
// client.devices.rejectCommand("9169303d7066ccbe880998ab124e70f6", "201512e91716a82c3087227d57b7217d0966d2", { no: "no" }, function(response) {
// console.log(response.json);
// });
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc