homey-api 3.11.2 → 3.12.0

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.
@@ -106,7 +106,7 @@
106
106
  "type": "string",
107
107
  "in": "body"
108
108
  },
109
- "payload": {
109
+ "recordings": {
110
110
  "type": "array",
111
111
  "in": "body"
112
112
  }
@@ -622,7 +622,13 @@
622
622
  "getInstallerInformation": {
623
623
  "path": "/user/{userId}/installer-information",
624
624
  "method": "get",
625
- "parameters": {}
625
+ "parameters": {
626
+ "userId": {
627
+ "in": "path",
628
+ "type": "string",
629
+ "required": true
630
+ }
631
+ }
626
632
  },
627
633
  "getBridges": {
628
634
  "path": "/bridge/",
@@ -0,0 +1,74 @@
1
+ {
2
+ "host": "energy-api.athom.com",
3
+ "basePath": "/api/v1/",
4
+ "operations": {
5
+ "getZone": {
6
+ "path": "/zone",
7
+ "method": "get",
8
+ "parameters": {
9
+ "latitude": {
10
+ "in": "query",
11
+ "type": "string",
12
+ "required": true
13
+ },
14
+ "longitude": {
15
+ "in": "query",
16
+ "type": "string",
17
+ "required": true
18
+ },
19
+ "secret": {
20
+ "in": "query",
21
+ "type": "string"
22
+ }
23
+ }
24
+ },
25
+ "getZones": {
26
+ "path": "/zones",
27
+ "method": "get",
28
+ "parameters": {
29
+ "secret": {
30
+ "in": "query",
31
+ "type": "string"
32
+ }
33
+ }
34
+ },
35
+ "getDayAheadPricesElectricity": {
36
+ "path": "/day-ahead-prices/electricity",
37
+ "method": "get",
38
+ "parameters": {
39
+ "zoneId": {
40
+ "in": "query",
41
+ "type": "string",
42
+ "required": true
43
+ },
44
+ "zoneVersion": {
45
+ "in": "query",
46
+ "type": "string",
47
+ "required": true
48
+ },
49
+ "date": {
50
+ "in": "query",
51
+ "type": "string",
52
+ "required": true
53
+ },
54
+ "timezone": {
55
+ "in": "query",
56
+ "type": "string",
57
+ "required": true
58
+ },
59
+ "currency": {
60
+ "in": "query",
61
+ "type": "string"
62
+ },
63
+ "interval": {
64
+ "in": "query",
65
+ "type": "string"
66
+ },
67
+ "secret": {
68
+ "in": "query",
69
+ "type": "string"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -1585,7 +1585,7 @@ export class AthomCloudAPI {
1585
1585
 
1586
1586
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
1587
1587
 
1588
- getInstallerInformation(): Promise<any>;
1588
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
1589
1589
 
1590
1590
  isLoggedIn(): Promise<boolean>;
1591
1591
 
@@ -1617,7 +1617,7 @@ export class AthomCloudAPI {
1617
1617
 
1618
1618
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
1619
1619
 
1620
- getInstallerInformation(): Promise<any>;
1620
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
1621
1621
 
1622
1622
  isLoggedIn(): Promise<boolean>;
1623
1623
 
@@ -1769,7 +1769,7 @@ export class AthomCloudAPI {
1769
1769
 
1770
1770
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
1771
1771
 
1772
- getInstallerInformation(): Promise<any>;
1772
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
1773
1773
 
1774
1774
  isLoggedIn(): Promise<boolean>;
1775
1775
 
@@ -1801,7 +1801,7 @@ export class AthomCloudAPI {
1801
1801
 
1802
1802
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
1803
1803
 
1804
- getInstallerInformation(): Promise<any>;
1804
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
1805
1805
 
1806
1806
  isLoggedIn(): Promise<boolean>;
1807
1807
 
@@ -1727,7 +1727,7 @@ export class AthomAppsAPI {
1727
1727
 
1728
1728
  homeyPlatform?: string;
1729
1729
 
1730
- payload?: Array<any>;
1730
+ recordings?: Array<any>;
1731
1731
  }): Promise<any>;
1732
1732
 
1733
1733
  searchZigbeeDriver(opts: {
@@ -2061,7 +2061,7 @@ export class AthomAppsAPI {
2061
2061
 
2062
2062
  homeyPlatform?: string;
2063
2063
 
2064
- payload?: Array<any>;
2064
+ recordings?: Array<any>;
2065
2065
  }): Promise<any>;
2066
2066
 
2067
2067
  searchZigbeeDriver(opts: {
@@ -2762,7 +2762,7 @@ export class AthomCloudAPI {
2762
2762
 
2763
2763
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
2764
2764
 
2765
- getInstallerInformation(): Promise<any>;
2765
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
2766
2766
 
2767
2767
  getBridges(opts: {
2768
2768
  serial?: string;
@@ -3348,7 +3348,7 @@ export class AthomCloudAPI {
3348
3348
 
3349
3349
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
3350
3350
 
3351
- getInstallerInformation(): Promise<any>;
3351
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
3352
3352
 
3353
3353
  getBridges(opts: {
3354
3354
  serial?: string;
@@ -3803,6 +3803,68 @@ export class AthomDNSAPI {
3803
3803
  getHomeyCertificate(opts: { secret: string }): Promise<any>;
3804
3804
  }
3805
3805
 
3806
+ export class AthomEnergyAPI {
3807
+ constructor(opts?: {
3808
+ baseUrl?: string;
3809
+
3810
+ debug?: boolean;
3811
+
3812
+ secret?: string;
3813
+ });
3814
+
3815
+ getZone(opts: {
3816
+ latitude: string;
3817
+
3818
+ longitude: string;
3819
+
3820
+ secret?: string;
3821
+ }): Promise<any>;
3822
+
3823
+ getZones(opts: { secret?: string }): Promise<any>;
3824
+
3825
+ getDayAheadPricesElectricity(opts: {
3826
+ zoneId: string;
3827
+
3828
+ zoneVersion: string;
3829
+
3830
+ date: string;
3831
+
3832
+ timezone: string;
3833
+
3834
+ currency?: string;
3835
+
3836
+ interval?: string;
3837
+
3838
+ secret?: string;
3839
+ }): Promise<any>;
3840
+
3841
+ getZone(opts: {
3842
+ latitude: string;
3843
+
3844
+ longitude: string;
3845
+
3846
+ secret?: string;
3847
+ }): Promise<any>;
3848
+
3849
+ getZones(opts: { secret?: string }): Promise<any>;
3850
+
3851
+ getDayAheadPricesElectricity(opts: {
3852
+ zoneId: string;
3853
+
3854
+ zoneVersion: string;
3855
+
3856
+ date: string;
3857
+
3858
+ timezone: string;
3859
+
3860
+ currency?: string;
3861
+
3862
+ interval?: string;
3863
+
3864
+ secret?: string;
3865
+ }): Promise<any>;
3866
+ }
3867
+
3806
3868
  export class AthomFirmwareAPI {
3807
3869
  constructor(opts?: {
3808
3870
  baseUrl?: string;
@@ -5099,7 +5161,7 @@ export class AthomAppsAPI {
5099
5161
 
5100
5162
  homeyPlatform?: string;
5101
5163
 
5102
- payload?: Array<any>;
5164
+ recordings?: Array<any>;
5103
5165
  }): Promise<any>;
5104
5166
 
5105
5167
  searchZigbeeDriver(opts: {
@@ -5433,7 +5495,7 @@ export class AthomAppsAPI {
5433
5495
 
5434
5496
  homeyPlatform?: string;
5435
5497
 
5436
- payload?: Array<any>;
5498
+ recordings?: Array<any>;
5437
5499
  }): Promise<any>;
5438
5500
 
5439
5501
  searchZigbeeDriver(opts: {
@@ -6134,7 +6196,7 @@ export class AthomCloudAPI {
6134
6196
 
6135
6197
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
6136
6198
 
6137
- getInstallerInformation(): Promise<any>;
6199
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
6138
6200
 
6139
6201
  getBridges(opts: {
6140
6202
  serial?: string;
@@ -6720,7 +6782,7 @@ export class AthomCloudAPI {
6720
6782
 
6721
6783
  unsubscribeAuthenticatedUserFromNewsletter(): Promise<any>;
6722
6784
 
6723
- getInstallerInformation(): Promise<any>;
6785
+ getInstallerInformation(opts: { userId: string }): Promise<any>;
6724
6786
 
6725
6787
  getBridges(opts: {
6726
6788
  serial?: string;
@@ -7175,6 +7237,68 @@ export class AthomDNSAPI {
7175
7237
  getHomeyCertificate(opts: { secret: string }): Promise<any>;
7176
7238
  }
7177
7239
 
7240
+ export class AthomEnergyAPI {
7241
+ constructor(opts?: {
7242
+ baseUrl?: string;
7243
+
7244
+ debug?: boolean;
7245
+
7246
+ secret?: string;
7247
+ });
7248
+
7249
+ getZone(opts: {
7250
+ latitude: string;
7251
+
7252
+ longitude: string;
7253
+
7254
+ secret?: string;
7255
+ }): Promise<any>;
7256
+
7257
+ getZones(opts: { secret?: string }): Promise<any>;
7258
+
7259
+ getDayAheadPricesElectricity(opts: {
7260
+ zoneId: string;
7261
+
7262
+ zoneVersion: string;
7263
+
7264
+ date: string;
7265
+
7266
+ timezone: string;
7267
+
7268
+ currency?: string;
7269
+
7270
+ interval?: string;
7271
+
7272
+ secret?: string;
7273
+ }): Promise<any>;
7274
+
7275
+ getZone(opts: {
7276
+ latitude: string;
7277
+
7278
+ longitude: string;
7279
+
7280
+ secret?: string;
7281
+ }): Promise<any>;
7282
+
7283
+ getZones(opts: { secret?: string }): Promise<any>;
7284
+
7285
+ getDayAheadPricesElectricity(opts: {
7286
+ zoneId: string;
7287
+
7288
+ zoneVersion: string;
7289
+
7290
+ date: string;
7291
+
7292
+ timezone: string;
7293
+
7294
+ currency?: string;
7295
+
7296
+ interval?: string;
7297
+
7298
+ secret?: string;
7299
+ }): Promise<any>;
7300
+ }
7301
+
7178
7302
  export class AthomFirmwareAPI {
7179
7303
  constructor(opts?: {
7180
7304
  baseUrl?: string;
package/index.js CHANGED
@@ -19,6 +19,7 @@ module.exports.AthomSetupAPI = require('./lib/AthomSetupAPI');
19
19
  module.exports.AthomStoreAPI = require('./lib/AthomStoreAPI');
20
20
  module.exports.AthomWeatherAPI = require('./lib/AthomWeatherAPI');
21
21
  module.exports.AthomWebhooksAPI = require('./lib/AthomWebhooksAPI');
22
+ module.exports.AthomEnergyAPI = require('./lib/AthomEnergyAPI');
22
23
 
23
24
  // Homey Cloud
24
25
  module.exports.HomeyCloudAPI = require('./lib/HomeyCloudAPI');
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const API = require('./API');
4
+
5
+ class AthomEnergyAPI extends API {
6
+
7
+ static SPECIFICATION = require('../assets/specifications/AthomEnergyAPI.json');
8
+ static SPECIFICATION_URL = 'https://energy-api.athom.com/api/v1/specification.json';
9
+ static JSDOC_PRIVATE = true;
10
+
11
+ }
12
+
13
+ module.exports = AthomEnergyAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.11.2",
3
+ "version": "3.12.0",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [