Skip to content

Commit 5c2be7d

Browse files
authored
feat: prometheus delorean faker (#46)
1 parent eda21fe commit 5c2be7d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

lib/Services/prometheus.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,41 @@ class Prometheus extends Request {
5050
payload
5151
});
5252
}
53+
54+
genFakeDeviceReadings(
55+
thing_id,
56+
hardware_id,
57+
device_type_id,
58+
propMapping,
59+
historyQuery
60+
) {
61+
const path = `/v1/delegate/fake-readings`;
62+
const payload = {
63+
thing_id,
64+
hardware_id,
65+
device_type_id,
66+
propMapping,
67+
historyQuery
68+
};
69+
70+
return this.send('POST', path, {
71+
isPublic: true,
72+
payload
73+
});
74+
}
75+
76+
genFakeDevicesState(things, query) {
77+
const path = `/v1/delegate/fake-state`;
78+
const payload = {
79+
things,
80+
query
81+
};
82+
83+
return this.send('POST', path, {
84+
isPublic: true,
85+
payload
86+
});
87+
}
5388
}
5489

5590
module.exports = Prometheus;

0 commit comments

Comments
 (0)