chronograph-npm 0.0.8 → 0.1.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.
package/dist/cg.d.ts CHANGED
@@ -3,11 +3,13 @@ export class CG {
3
3
  homey: any;
4
4
  }): Promise<CG>;
5
5
  static detroy(): void;
6
+ static getAllChronographs(): Promise<any>;
7
+ static getChronographs(): Promise<any>;
6
8
  /**
7
- * @override Setable member, when set, will be activated on any variable update.
9
+ * @description Setable member, when set, will be activated on any variable update.
8
10
  * @param {Object} param0.variable
9
11
  */
10
- static override onChronographUpdate({ chronograph }: any): Promise<void>;
12
+ static onChronographUpdate({ chronograph }: any): Promise<void>;
11
13
  constructor({ homey }: {
12
14
  homey: any;
13
15
  });
package/dist/cg.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,sBAQC;IAgCD;;;OAGG;IACH,yEAGC;IA7ED;;OAWC;IATG,WAA6B;IAC7B,iBAAoB;IAIpB,WAAyC;IAM7C,2BAaC;IAVW,SAAqC;IAyBjD,uDAMC;IAGD,eAAe;IACf,kBAeC;CAeJ"}
1
+ {"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,sBAQC;IAgCD,0CAEC;IAED,uCAEC;IAKD;;;OAGG;IACH,gEAGC;IAxFD;;OAWC;IATG,WAA6B;IAC7B,iBAAoB;IAIpB,WAAyC;IAM7C,2BAaC;IAVW,SAAqC;IAyBjD,uDAOC;IAGD,eAAe;IACf,kBAeC;CAyBJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chronograph-npm",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "The Chronograph App for Athom's Homey",
5
5
  "main": "src/cg.js",
6
6
  "types": "./dist/cg.d.ts",
package/src/cg.js CHANGED
@@ -71,6 +71,7 @@ class CG {
71
71
  if(!CG.isReady && CG._defer) CG._defer.resolve();
72
72
 
73
73
  if (event === 'chronograph_event') {
74
+ if(data && data.now) data.now = new Date(data.now);
74
75
  CG.onChronographUpdate({chronograph:data});
75
76
  }
76
77
  }
@@ -94,14 +95,24 @@ class CG {
94
95
  return this.api;
95
96
  }
96
97
 
98
+
99
+ static async getAllChronographs() {
100
+ if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/allchronographs')
101
+ }
102
+
103
+ static async getChronographs() {
104
+ if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/chronographs')
105
+ }
106
+
107
+
97
108
 
98
109
 
99
110
  /**
100
- * @override Setable member, when set, will be activated on any variable update.
111
+ * @description Setable member, when set, will be activated on any variable update.
101
112
  * @param {Object} param0.variable
102
113
  */
103
114
  static async onChronographUpdate({chronograph}) {
104
- BL.homey.log('onChronographUpdate: ', chronograph);
115
+ //BL.homey.log('onChronographUpdate: ', chronograph);
105
116
 
106
117
  }
107
118