File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,21 @@ class Cayenne {
236
236
return this . auth . send ( this . service , 'POST' , url , { payload } ) ;
237
237
}
238
238
239
+ /**
240
+ * Pairs a thing to account
241
+ * @param {Object } userId
242
+ * @param {Object } thingId
243
+ * @param {String } payload.name Thing's name
244
+ * @param {String } payload.hardware_id Thing's unique hardware id
245
+ * @param {String } payload.network Thing's network
246
+ */
247
+ pairUpdateThing ( userId , thingId , payload ) {
248
+ const url = `${ this . url } /things/${ thingId } /pair` ;
249
+ payload . user_id = userId ;
250
+
251
+ return this . auth . send ( this . service , 'PUT' , url , { payload } ) ;
252
+ }
253
+
239
254
/**
240
255
* Gets a device properties by hardware id
241
256
* @param {String } hardwareId Device's unique hardware id
You can’t perform that action at this time.
0 commit comments