homey-api 1.5.4 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,6 +258,17 @@
258
258
  }
259
259
  }
260
260
  },
261
+ "getAppDriversStats": {
262
+ "path": "/app/{appId}/drivers/stats",
263
+ "method": "get",
264
+ "parameters": {
265
+ "appId": {
266
+ "in": "path",
267
+ "type": "string",
268
+ "required": true
269
+ }
270
+ }
271
+ },
261
272
  "getBuilds": {
262
273
  "path": "/app/{appId}/build",
263
274
  "method": "get",
@@ -1038,6 +1038,12 @@
1038
1038
  "private": true,
1039
1039
  "parameters": {}
1040
1040
  },
1041
+ "getAppDriversStatistics": {
1042
+ "path": "/stats/app-drivers",
1043
+ "method": "get",
1044
+ "private": true,
1045
+ "parameters": {}
1046
+ },
1041
1047
  "getLocationStatistics": {
1042
1048
  "path": "/stats/locations",
1043
1049
  "method": "get",
@@ -444,6 +444,25 @@
444
444
 
445
445
 
446
446
 
447
+ opts: {
448
+
449
+
450
+ appId: string,
451
+
452
+
453
+ },
454
+
455
+
456
+
457
+
458
+ ):
459
+ Promise<any>;
460
+
461
+ getAppDriversStats(
462
+
463
+
464
+
465
+
447
466
  opts: {
448
467
 
449
468
 
@@ -2758,6 +2777,11 @@
2758
2777
 
2759
2778
  getAppInstallsStatistics(
2760
2779
 
2780
+ ):
2781
+ Promise<any>;
2782
+
2783
+ getAppDriversStatistics(
2784
+
2761
2785
  ):
2762
2786
  Promise<any>;
2763
2787
 
@@ -57,16 +57,16 @@ if (!loggedIn) {
57
57
  const user = await cloudApi.getAuthenticatedUser();
58
58
 
59
59
  // Get the first Homey of the logged in user
60
- const homeyApi = await user.getFirstHomey();
60
+ const homey = await user.getFirstHomey();
61
61
 
62
62
  // Create a session on this Homey
63
- const homey = await homey.authenticate();
63
+ const homeyApi = await homey.authenticate();
64
64
 
65
65
  // Loop all devices
66
- const devices = await homey.devices.getDevices();
66
+ const devices = await homeyApi.devices.getDevices();
67
67
  for(const device of Object.values(devices)) {
68
68
  // Turn device on
69
- await device.setCapabilityValue('onoff', true);
69
+ await device.setCapabilityValue({ capabilityId: 'onoff', value: true });
70
70
  }`;
71
71
 
72
72
  static JSDOC_PARAMS = `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "1.5.4",
3
+ "version": "1.5.8",
4
4
  "description": "Homey API",
5
5
  "main": "src/index.js",
6
6
  "types": "assets/types/homey-api.d.ts",