Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, first of all thank you @alberto-bottarini for creating the batch functionality.
In the discussion of #83 @jorgeborges said he would prefer the batch to be sent automatically after the 20 enqueued url's have been reached. Personally I like this approach so this is why i'm creating this pull request.
I've also added a hasEnqueuedUrls method. This method allows us to determine if any enqueued url's are still available before sending the response back to the client. If any are available then send the enqueued hits. We're using Laravel so I created a middleware to do exactly that for each response.
This way we don't have to worry about the limit.
It would be nice to have at least the hasEnqueuedUrls method added. I understand the philosophy behind the exception approach as well, if you decide to keep it that way than i will create something myself.
I coudn't get phpunit to work, i got the following error:
I'll check them again if they do not pass.