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

[question] pagination ? #20

Closed
smolleyes opened this issue Jan 14, 2018 · 3 comments
Closed

[question] pagination ? #20

smolleyes opened this issue Jan 14, 2018 · 3 comments

Comments

@smolleyes
Copy link

hi

how can we paginate with this package?

thanks

@smolleyes
Copy link
Author

and sort by

@smolleyes
Copy link
Author

smolleyes commented Jan 14, 2018

if i understand the code, you ask a limit then fetch x page, this is bad to me, better to keep an index of totalResults for each engine, then split by defaultResultsPerPage for each engine, then just ask a start point (working on this), what about a regulary update object like this, (don t care about pageLoading and engine_name..) but for the providers array

https://imgur.com/a/6wQO9

@JimmyLaurent
Copy link
Owner

I don't plan to include "sortBy" or "pagination" features because I prefer to keep the api simple and heterogeneous.

Still:

  • pagination is possible but it means that you need to:
    * modify providers "searchUrl" to include a page number
    * modify providers base class to make queries including the "pageNumber"

    => multi search feature will be inconsistent

  • sortBy is not always avalaible on websites.

    => search feature will be inconsistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants