Skip to content

Commit f2a1eef

Browse files
committed
fix: adding query for page limiting
1 parent db4f250 commit f2a1eef

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lib/Services/cayenne.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,15 @@ class Cayenne {
297297
return this.auth.send(this.service, 'GET', url);
298298
}
299299

300-
/**
300+
/**
301301
* Gets V2 all things data types
302+
* @param {Object} query
303+
* @param {Number} [query.limit]
304+
* @param {Number} [query.page]
302305
*/
303-
getThingDataTypesV2() {
306+
getThingDataTypesV2(query) {
304307
const url = `${this.url}/v2/things/datatypes`;
305-
return this.auth.send(this.service, 'GET', url);
308+
return this.auth.send(this.service, 'GET', url, { query });
306309
}
307310

308311
/**
@@ -315,10 +318,13 @@ class Cayenne {
315318

316319
/**
317320
* Get V2 one things data type properties
321+
* @param {Object} query
322+
* @param {Number} [query.limit]
323+
* @param {Number} [query.page]
318324
*/
319-
getThingDataTypePropertiesV2(id) {
325+
getThingDataTypePropertiesV2(id, query) {
320326
const url = `${this.url}/v2/things/datatypes/${id}/properties`;
321-
return this.auth.send(this.service, 'GET', url);
327+
return this.auth.send(this.service, 'GET', url, { query });
322328
}
323329

324330
/**

0 commit comments

Comments
 (0)