Skip to content

Commit 0752a55

Browse files
authored
Merge pull request #10 from myDevicesIoT/feat/add-delorean-download-api
Feat/add delorean download api
2 parents a849246 + 076d91c commit 0752a55

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/Services/delorean-es.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ class DeloreanES {
105105
query = { ...query, user_id: userId };
106106
return this.auth.send(this.service, 'GET', url, { query });
107107
}
108+
109+
/**
110+
* @param {String} userId
111+
* @param {String} deviceId
112+
* @param {Object} payload
113+
*/
114+
postDownloadRequest(userId, deviceId, payload) {
115+
const url = `${this.url}/devices/${deviceId}/readings/download`;
116+
payload = { ...payload, user_id: userId };
117+
return this.auth.send(this.service, 'POST', url, { payload });
118+
}
108119
}
109120

110121
module.exports = DeloreanES;

0 commit comments

Comments
 (0)