File tree Expand file tree Collapse file tree 6 files changed +22
-11
lines changed Expand file tree Collapse file tree 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 {
8383 console . log ( "Google Fit: Added daily summaries" ) ;
8484 }
8585
86- async legacy ( ) {
86+ async legacy ( start : string ) {
8787 const CONCURRENCY = 1 ;
88- const startDate = dayjs ( "2020-07-29" ) ;
88+ const startDate = dayjs ( start ) ;
8989 let count = 0 ;
9090 const pool = new PromisePool ( async ( ) => {
9191 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 {
181181
182182 console . log ( "Last.fm: Completed" ) ;
183183 }
184- async legacy ( ) {
184+ async legacy ( start : string ) {
185185 const CONCURRENCY = 10 ;
186- const startDate = dayjs ( "2014-03-11" ) ;
186+ const startDate = dayjs ( start ) ;
187187 let count = 0 ;
188188 const pool = new PromisePool ( async ( ) => {
189189 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 {
138138 }
139139 console . log ( "Oura: Added daily summaries" ) ;
140140 }
141- async legacy ( ) {
141+ async legacy ( start : string ) {
142142 const CONCURRENCY = 1 ;
143- const startDate = dayjs ( "2020-08-15" ) ;
143+ const startDate = dayjs ( start ) ;
144144 let count = 0 ;
145145 const pool = new PromisePool ( async ( ) => {
146146 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 {
130130 }
131131 console . log ( "RescueTime: Added daily summaries" ) ;
132132 }
133- async legacy ( ) {
133+ async legacy ( start : string ) {
134134 const CONCURRENCY = 10 ;
135- const startDate = dayjs ( "2017-12-18" ) ;
135+ const startDate = dayjs ( start ) ;
136136 let count = 0 ;
137137 const pool = new PromisePool ( async ( ) => {
138138 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 {
4343 }
4444 console . log ( "WakaTime: Added daily summaries" ) ;
4545 }
46- async legacy ( ) {
46+ async legacy ( start : string ) {
4747 const CONCURRENCY = 3 ;
48- const startDate = dayjs ( "2020-07-20" ) ;
48+ const startDate = dayjs ( start ) ;
4949 let count = 0 ;
5050 const pool = new PromisePool ( async ( ) => {
5151 const date = dayjs ( startDate ) . add ( count , "day" ) ;
Original file line number Diff line number Diff line change 11/** Stethoscope Integration */
22interface Integration {
3+ /** Slugified name of the integration */
34 name : string ;
5+
6+ /** Fetch new data and update */
47 update : ( ) => Promise < void > ;
8+
9+ /** Generate data summary for API */
510 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 */
718 cli : {
819 [ index : string ] : ( ...params : any [ ] ) => Promise < void > ;
920 } ;
You can’t perform that action at this time.
0 commit comments