+
Skip to content

Use only one time parameter when quering multiple pages #123

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

Closed
wants to merge 1 commit into from

Conversation

bumbu
Copy link

@bumbu bumbu commented Aug 28, 2014

If a resource has multiple pages the script will use next value to retrieve next page.
Because all requests are done with datetime append to url (probably to avoid caching) next containes that link.

https://api.github.com/repos/user/repo/issues/events?per_page=100&1409248439577

Second page will be requested by appending a new datetime, so we'll have something like

https://api.github.com/repos/user/repo/issues/events?per_page=100&page=2&1409248439577=&1409257105342

Third page url will contain 3 datetime stamps and so on. At some point this will rise an error as browser (and server) has a limit for url size. This way it will cut some of the parameters or will simply throw an error.

@aendra-rininsland
Copy link
Member

Sounds like a plan. I'm not sure two regex replaces are the best or most performant option, though; also, it's a really old PR and I'd like some unit tests to ensure it doesn't break anything else. Mind doing so? Thanks!

@aendra-rininsland
Copy link
Member

Closed in error; reopening.

@aendra-rininsland aendra-rininsland force-pushed the master branch 2 times, most recently from e746e5d to 6f04f13 Compare November 17, 2015 16:15
AurelioDeRosa added a commit that referenced this pull request Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载