You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI David. I noticed that the per_page param is converted to the default value when it is 0. I'd like my API's clients to be able to fetch merely the total number of objects (found in the X-Total header) w/o fetching any actual objects. This is easily implemented by accepting 0 as a valid per_page value. Right now I'd have to monkey patch methods (i.e this one) to make that work. Would you consider allowing zero for the per_page param? Maybe using a new config option if you don't want to break existing behavior.
I'm not sure how well supported this is by the underlying pagination libraries though, you might run into ZeroDivisionError's and such, which you'll then have to deal with.
The text was updated successfully, but these errors were encountered:
HI David. I noticed that the
per_page
param is converted to the default value when it is 0. I'd like my API's clients to be able to fetch merely the total number of objects (found in the X-Total header) w/o fetching any actual objects. This is easily implemented by accepting 0 as a validper_page
value. Right now I'd have to monkey patch methods (i.e this one) to make that work. Would you consider allowing zero for theper_page
param? Maybe using a new config option if you don't want to break existing behavior.I'm not sure how well supported this is by the underlying pagination libraries though, you might run into ZeroDivisionError's and such, which you'll then have to deal with.
The text was updated successfully, but these errors were encountered: