File tree 6 files changed +22
-11
lines changed
6 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ export default class GoogleFit implements Integration {
83
83
console . log ( "Google Fit: Added daily summaries" ) ;
84
84
}
85
85
86
- async legacy ( ) {
86
+ async legacy ( start : string ) {
87
87
const CONCURRENCY = 1 ;
88
- const startDate = dayjs ( "2020-07-29" ) ;
88
+ const startDate = dayjs ( start ) ;
89
89
let count = 0 ;
90
90
const pool = new PromisePool ( async ( ) => {
91
91
const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change @@ -181,9 +181,9 @@ export default class LastDotFm implements Integration {
181
181
182
182
console . log ( "Last.fm: Completed" ) ;
183
183
}
184
- async legacy ( ) {
184
+ async legacy ( start : string ) {
185
185
const CONCURRENCY = 10 ;
186
- const startDate = dayjs ( "2014-03-11" ) ;
186
+ const startDate = dayjs ( start ) ;
187
187
let count = 0 ;
188
188
const pool = new PromisePool ( async ( ) => {
189
189
const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change @@ -138,9 +138,9 @@ export default class OuraRing implements Integration {
138
138
}
139
139
console . log ( "Oura: Added daily summaries" ) ;
140
140
}
141
- async legacy ( ) {
141
+ async legacy ( start : string ) {
142
142
const CONCURRENCY = 1 ;
143
- const startDate = dayjs ( "2020-08-15" ) ;
143
+ const startDate = dayjs ( start ) ;
144
144
let count = 0 ;
145
145
const pool = new PromisePool ( async ( ) => {
146
146
const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change @@ -130,9 +130,9 @@ export default class RescueTime implements Integration {
130
130
}
131
131
console . log ( "RescueTime: Added daily summaries" ) ;
132
132
}
133
- async legacy ( ) {
133
+ async legacy ( start : string ) {
134
134
const CONCURRENCY = 10 ;
135
- const startDate = dayjs ( "2017-12-18" ) ;
135
+ const startDate = dayjs ( start ) ;
136
136
let count = 0 ;
137
137
const pool = new PromisePool ( async ( ) => {
138
138
const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ export default class Wakatime implements Integration {
43
43
}
44
44
console . log ( "WakaTime: Added daily summaries" ) ;
45
45
}
46
- async legacy ( ) {
46
+ async legacy ( start : string ) {
47
47
const CONCURRENCY = 3 ;
48
- const startDate = dayjs ( "2020-07-20" ) ;
48
+ const startDate = dayjs ( start ) ;
49
49
let count = 0 ;
50
50
const pool = new PromisePool ( async ( ) => {
51
51
const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change 1
1
/** Stethoscope Integration */
2
2
interface Integration {
3
+ /** Slugified name of the integration */
3
4
name : string ;
5
+
6
+ /** Fetch new data and update */
4
7
update : ( ) => Promise < void > ;
8
+
9
+ /** Generate data summary for API */
5
10
summary : ( ) => Promise < void > ;
6
- legacy : ( date : string | Date ) => Promise < void > ;
11
+
12
+ /**
13
+ * @param start - Start date to fetch data from in YYYY-MM-DD format
14
+ */
15
+ legacy : ( start : string ) => Promise < void > ;
16
+
17
+ /** CLI methods to export */
7
18
cli : {
8
19
[ index : string ] : ( ...params : any [ ] ) => Promise < void > ;
9
20
} ;
You can’t perform that action at this time.
0 commit comments