-
Notifications
You must be signed in to change notification settings - Fork 115
added optional start parameter, enabling pagination #29
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
Conversation
|
Is there any way to rerun the Travis build? I'm not sure that the failure was related to my changes. |
|
Here are my local test results: |
|
Paging is already supported. What's the use case for not wanting to start on the first page? |
|
My use-case is an application running on multiple instances which needs to add a batch of results to a database independent of the state of other instances, and independent of the application lifecycle on a single instance. Making the paging an optional parameter with a few lines of code made a lot more sense to me than having to build state management around the module. This change makes it easy to check a database for the index of the last page retrieved from Google, and run the next query from there. As an aside, it is easier to use the module without abusing it if you do a deeper (multi-page) search over a longer period of time instead of paging on a loop. |
This is an excellent point. Ok, I'll incorporate this... I think that I wanna refactor the module... |
|
I'll accept the PR, but first, please add a test. Something as simple as searching for something with the new parameter and checking for results. |
|
Great! Test added. |
added optional start parameter, enabling pagination
|
Thanks, published :) |
This pull requests adds an optional starting index for google requests. You can set the number of results by which you want your query to be offset. To use it, change syntax from:
to: