Skip to content

Commit

Permalink
feat: ✨ Timer suggestions from up to 10 days in past
Browse files Browse the repository at this point in the history
  • Loading branch information
mcndt committed Aug 22, 2022
1 parent c3f734e commit ec891fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Some code cleanup
- Big queries are now performed sequentially to prevent all queries failing due to rate limiting (API error 429)
- Timer suggestions now come from up to 10 days in the past (previously 7 days)

## [0.8.2]

Expand Down
5 changes: 4 additions & 1 deletion lib/toggl/ApiManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ export default class TogglAPI {
*/
public async getRecentTimeEntries(): Promise<TimeEntry[]> {
const response = await this._api.reports.details(
this._settings.workspace.id
this._settings.workspace.id,
{
since: moment().subtract(9, 'day').format('YYYY-MM-DD')
}
);
console.debug('Toggl API response: recent time entries');
return response.data.map(
Expand Down

0 comments on commit ec891fa

Please sign in to comment.