Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWClient.countEvents() is querying using incorrect params #39

Open
Francoisvt04 opened this issue Jan 19, 2023 · 0 comments
Open

AWClient.countEvents() is querying using incorrect params #39

Francoisvt04 opened this issue Jan 19, 2023 · 0 comments

Comments

@Francoisvt04
Copy link

Issue

Just recently used your library for interacting with the Activity Watch client via JS I did notice that when I query the event count it does not correlate with the results I get back from fetching the events.

Context

For both queries I used the same start and end time but the count and results do not line up. I used a limit of 100 and one of my buckets came back with a count of 389 but the records returned where only 97. So I checked the request and your source code noticed that for AWClient.countEvents() you are passing the time params as "starttime" and "endtime" which are not the params stated in the docs, resulting in from what I can see it querying all the data in a bucket instead of scoping to the timestamps.

TLDR Fix

Query params for AWClient.countEvents() should be start and end, not starttime, endtime when making the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant