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
letusers= wordPressApi.paginate(User.self, orderBy: \.name)letfirstPage:[User]=tryawait users.nextPage()letsecondPage:[User]=tryawait users.nextPage()// Same syntax can be used on Postletposts= wordPressApi.paginate(Post.self, orderBy: \.modifiedDate)letfirstPage:[User]=tryawait posts.nextPage()letsecondPage:[User]=tryawait posts.nextPage()
The text was updated successfully, but these errors were encountered:
I also wonder if in this case the developer cares less about which page they're on, and more about knowing that they've retrieved all records? For instance, being able to iterate over all users instead of over pages of users?
One thing I'm not sure of is, do we want (or is it feasible) to implement this shared pagination in rust, given we now mainly use WPApiHelper to build requests and parse responses?
It'd be nice to have a single pagination implementation for all resources. What do you all think?
The text was updated successfully, but these errors were encountered: