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

Use case should handle lazy load due to the API design #79

Closed
ryanw-mobile opened this issue May 20, 2024 · 2 comments · Fixed by #225
Closed

Use case should handle lazy load due to the API design #79

ryanw-mobile opened this issue May 20, 2024 · 2 comments · Fixed by #225
Assignees
Labels
feature A new feature for the user, not a new feature for a build script.
Milestone

Comments

@ryanw-mobile
Copy link
Owner

Currently, the data source and repository are discarding paging data.
It is ok both of them do not automatically resume, but the use case should check and fire follow-up requests since we are supposed to plot the graph using a complete set of data.

@ryanw-mobile ryanw-mobile added the feature A new feature for the user, not a new feature for a build script. label May 20, 2024
@ryanw-mobile ryanw-mobile self-assigned this May 20, 2024
@ryanw-mobile
Copy link
Owner Author

This is linked to #96 when we support customised date range which might result in more than 100 records. Otherwise, even the hour-hourly view at present only returns 48 records per day.

At the top of the response it will tell you the number of records returned in the response (in this case 103). If the number of records exceeds the page_size (usually 100), you will have to explicitly ask for the next page - if so this will be given in the "next" field of the response.

@ryanw-mobile
Copy link
Owner Author

This might be better handled by the repository if we later on will implement DB/caching.
API includes top-level count which suggests the total number of records,
and next (a link that we are not currently parsing) if we can continue requests for the next data batch.
So, the repository is to keep on looping until either reaching count or next becomes null

@ryanw-mobile ryanw-mobile added this to the v1.3.0 milestone Jun 16, 2024
ryanw-mobile added a commit that referenced this issue Jun 21, 2024
…handle-lazy-load-due-to-the-api-design

(#79) Enable repository to handle paging and full data-set download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature for the user, not a new feature for a build script.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant