-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdevices.js
More file actions
37 lines (34 loc) · 771 Bytes
/
devices.js
File metadata and controls
37 lines (34 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
var _ = require('lodash');
module.exports = function (common) {
return {
/**
* Get all CGM devices
*
* @param cb
* @returns {cb} cb(err, response)
*/
getCGMDevices: function (cb) {
common.assertArgumentsSize(arguments, 1);
common.doGetWithToken(
'/v1/devices/cgms',
{ 200: function(res){ return res.body; }, 404: [] },
cb
);
},
/**
* Get all Pump devices
*
* @param cb
* @returns {cb} cb(err, response)
*/
getPumpDevices: function (cb) {
common.assertArgumentsSize(arguments, 1);
common.doGetWithToken(
'/v1/devices/pumps',
{ 200: function(res){ return res.body; }, 404: [] },
cb
);
},
};
};