File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
1
3
class Cayenne {
2
4
/**
3
5
* @param {String } url
@@ -295,6 +297,38 @@ class Cayenne {
295
297
return this . auth . send ( this . service , 'GET' , url ) ;
296
298
}
297
299
300
+ /**
301
+ * Gets V2 all things data types
302
+ */
303
+ getThingDataTypesV2 ( ) {
304
+ const url = `${ this . url } /v2/things/datatypes` ;
305
+ return this . auth . send ( this . service , 'GET' , url ) ;
306
+ }
307
+
308
+ /**
309
+ * Get V2 one things data type
310
+ */
311
+ getThingDataTypeV2 ( id ) {
312
+ const url = `${ this . url } /v2/things/datatypes/${ id } ` ;
313
+ return this . auth . send ( this . service , 'GET' , url ) ;
314
+ }
315
+
316
+ /**
317
+ * Get V2 one things data type properties
318
+ */
319
+ getThingDataTypePropertiesV2 ( id ) {
320
+ const url = `${ this . url } /v2/things/datatypes/${ id } /properties` ;
321
+ return this . auth . send ( this . service , 'GET' , url ) ;
322
+ }
323
+
324
+ /**
325
+ * Get V2 one things data type property by it's id
326
+ */
327
+ getThingDataTypePropertyV2 ( id , pid ) {
328
+ const url = `${ this . url } /v2/things/datatypes/${ id } /properties/${ pid } ` ;
329
+ return this . auth . send ( this . service , 'GET' , url ) ;
330
+ }
331
+
298
332
/**
299
333
* Gets thing types by query
300
334
* @param {Object } query
You can’t perform that action at this time.
0 commit comments