-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: new field pageCount for searchResult #823
feat: new field pageCount for searchResult #823
Conversation
Impacted files: * `api_get_user_products_test.dart`: now using `pageCount` instead of `count` * `api_search_products_test.dart`: skipped a test failing because of the server * `search_result.dart`: added field `pageCount` * `search_result.g.dart`: generated
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #823 +/- ##
==========================================
- Coverage 76.35% 76.00% -0.36%
==========================================
Files 205 205
Lines 7537 7539 +2
==========================================
- Hits 5755 5730 -25
- Misses 1782 1809 +27 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This may worth a bit of doc to explain the difference between count/pageCount
@@ -15,6 +15,9 @@ class SearchResult extends JsonObject { | |||
@JsonKey(name: 'count', fromJson: JsonObject.parseInt) | |||
final int? count; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// page_count is the number of products requested per page. Please be mindful of server resources, and keep that below 200.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
page_count is the number of products requested per page.
AFAIK it's rather the number of products found within that result page.
Thank you @g123k for your review! |
What
pageCount
forSearchResult
pageCount
) and the "total number of products" (count
).Impacted files:
api_get_user_products_test.dart
: now usingpageCount
instead ofcount
api_search_products_test.dart
: skipped a test failing because of the serversearch_result.dart
: added fieldpageCount
search_result.g.dart
: generated