@cpzxrobot/sdk 1.3.39 → 1.3.40
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/car_gateway.ts +8 -0
- package/dist/car_gateway.js +6 -0
- package/package.json +1 -1
package/car_gateway.ts
CHANGED
|
@@ -14,6 +14,14 @@ export class CarGateway extends Object {
|
|
|
14
14
|
.then((res) => res.data);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
async addWeightRecords(factory: Factory, data: any) {
|
|
18
|
+
var axios = await this.context.ready;
|
|
19
|
+
return axios
|
|
20
|
+
.post(`/api/v2/car/${factory.pid}/weightRecords`, data)
|
|
21
|
+
.then((res) => res.data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
17
25
|
async detections(factory: Factory, date: Date) {
|
|
18
26
|
var axios = await this.context.ready;
|
|
19
27
|
return axios
|
package/dist/car_gateway.js
CHANGED
|
@@ -12,6 +12,12 @@ class CarGateway extends Object {
|
|
|
12
12
|
.get(`/api/v2/car/${factory.pid}/weightRecords?date=` + date.toISOString())
|
|
13
13
|
.then((res) => res.data);
|
|
14
14
|
}
|
|
15
|
+
async addWeightRecords(factory, data) {
|
|
16
|
+
var axios = await this.context.ready;
|
|
17
|
+
return axios
|
|
18
|
+
.post(`/api/v2/car/${factory.pid}/weightRecords`, data)
|
|
19
|
+
.then((res) => res.data);
|
|
20
|
+
}
|
|
15
21
|
async detections(factory, date) {
|
|
16
22
|
var axios = await this.context.ready;
|
|
17
23
|
return axios
|