-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGlowStorage.js
72 lines (56 loc) · 1.26 KB
/
GlowStorage.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"use strict";
class GlowStorage {
constructor(store) {
this.store = store;
}
setLoginToken(loginToken) {
this.store['loginToken'] = loginToken;
return this;
}
getLoginToken() {
return this.store['loginToken'];
}
setBabyID(baby_id) {
this.store['babyID'] = baby_id;
return this;
}
getBabyID() {
return this.store['babyID'];
}
setBabySyncToken(sync_token) {
this.store['babySyncToken'] = sync_token;
return this;
}
getBabySyncToken() {
return this.store['babySyncToken'];
}
setUserSyncToken(sync_token) {
this.store['userSyncToken'] = sync_token;
return this;
}
getUserSyncToken() {
return this.store['userSyncToken'];
}
setLastFeedTime(last_feed_time) {
this.store['lastFeedTime'] = last_feed_time;
return this;
}
getLastFeedTime(last_feed_time) {
return this.store['lastFeedTime'] || 0;
}
setLastWakeTime(last_wake_time) {
this.store['lastWakeTime'] = last_wake_time;
return this;
}
getLastWakeTime(last_wake_time) {
return this.store['lastWakeTime'] || 0;
}
setLastResponse(response) {
this.store['lastResponse'] = response;
return this;
}
getLastResponse() {
return this.store['lastResponse'];
}
}
module.exports = GlowStorage;