-
Notifications
You must be signed in to change notification settings - Fork 62
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
Detailed Reports does not return all data #15
Comments
Fixing this seems to have motivated this commit on anwajler's [fork].(anwajler@c09c8d2) |
I've made a modification that fixes this on my own fork. It adds a flag that determines whether to return the body or just the data element. The details method then repeats the query for every page until all rows can be returned. While this seems to be the minimal change required, you may want a more general solution. Let me know what you would prefer. |
@hinoue-work, thanks for raising this issue and for the work you've put into it. If Toggl Reports API requires pagination for detailed reports I think it makes sense for togglv8 to enable users to consume details reports by page. Requesting all pages for every detailed report could cause problems. I started work on this but it requires some refactoring. Do you need this urgently? I like your idea of giving users the ability retrieve the full response with a function argument. I'll see if I can easily add that. Passing an optional argument all the way down to @anwajler's change requires that the {
"since":1361780172,
"data": {
"id":123,
"other...": "fields..."
}
} I have a Work-In-Progress branch (which also contains unrelated changes) if it interests you. |
Currently, it looks like a query using detailed reports in toggl V8 only returns 50 records. You complete the query by doing queries using the 'page' parameter after looking at the total_count returned by the first request.
But in the ruby bindings, the get method in togglv8::Connection ignores everything but the 'data' array, so it's impossible to know if there is more data to be returned. The detailed report in the ruby bindings should automatically iterate over total_count and then return all the data.
The text was updated successfully, but these errors were encountered: