Skip to content

Commit 53acc9f

Browse files
authored
Merge pull request #39 from myDevicesIoT/feat--get-all-attribute-groups
Feat: get all attribute groups from cayenne api
2 parents ee70e0e + f6aa5d2 commit 53acc9f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Services/cayenne.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@ class Cayenne extends Request {
161161
return this.send('GET', path, { query });
162162
}
163163

164+
/**
165+
* Gets all attribute groups and attributes for a user and app
166+
* @param {string} applicationId
167+
* @param {string} userId The user id of the user that owns the parent device
168+
* @param {Object} query
169+
*/
170+
getAllAttributeGroups(applicationId, userId, query) {
171+
const path = `/things/groups`;
172+
query = this.setTenant(applicationId, userId);
173+
return this.send('GET', path, { query });
174+
}
175+
164176
/**
165177
* Delete all groups and attributes for a user
166178
* @param {string} applicationId

0 commit comments

Comments
 (0)