Comparing version 4.0.1 to 4.1.0
# Contribution Workflow for M2X Client Libraries | ||
All feature requests and issues should be initially reported in the issues section for this repo. We follow the convention of naming an issue by prefixing its description with the issue type, as in "Feature Request: xxx", "Bug: xxx", or "UI: xxx". | ||
If you would like to submit an issue or contribute to any M2X Client Library, please adhere to the contribution guidelines found here: https://github.com/attm2x/m2x-service/blob/master/CONTRIBUTING.md | ||
Try to use distinct and descriptive subject lines to make issues easier to identify. The description should include as much information as necessary to define the issue so that implementation can begin. | ||
# Creating a new library | ||
If you are creating a new client library, please adhere to the guidelines found here: https://github.com/attm2x/m2x-service/blob/master/CLIENT-CONTRIBUTIONS.md |
@@ -55,2 +55,20 @@ /** | ||
// Add device to collection | ||
// | ||
// https://m2x.att.com/developer/documentation/v2/collections#Add-device-to-collection | ||
Collections.prototype.addDevice = function(id, deviceId, callback) { | ||
return this.client.put(helpers.url("/collections/%s/devices/%s", id, deviceId), { | ||
headers: { "Content-Type": "application/json" } | ||
}, callback); | ||
}; | ||
// Remove device from collection | ||
// | ||
// https://m2x.att.com/developer/documentation/v2/collections#Remove-device-from-collection | ||
Collections.prototype.removeDevice = function(id, deviceId, callback) { | ||
return this.client.del(helpers.url("/collections/%s/devices/%s", id, deviceId), { | ||
headers: { "Content-Type": "application/json" } | ||
}, callback); | ||
}; | ||
// Read Collection Metadata | ||
@@ -57,0 +75,0 @@ // |
{ | ||
"name": "m2x", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "AT&T M2X API client for node.js", | ||
@@ -5,0 +5,0 @@ "main": "./lib/m2x", |
56253
25
1362