-
Notifications
You must be signed in to change notification settings - Fork 761
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
[Feature Request] Ability to fetch a single page of items in a list #406
Comments
So this gets interesting because there's a few ways to do this. First is to be transparent about paging. So, something like:
Can't say that I'm a huge fan of that approach. Though if you move to using the newer Then you could do something like this:
Though the ES5 equivalent gets really messy:
Essentially downstream users that use Babel would be the ones to win here, those not Using Babel would need to wait a few years for the Spec changes to replicate to the different JavaScript interpreters. If we did the async generator approach then we should callout in the docs that Babel is recommended and that we wouldn't support users not using Babel. @clayreimann Thoughts? |
I'm down for that. A (stupidly simple) alternative would be to allow the users to send a |
@mtscout6 I'd still like to make this happen. I'm down for either approach - do you have any thoughts? |
The page option is a valid option, and much simpler too. Go ahead and submit a PR for it. |
Opened a pull request: #409 |
This would be all set, but when I |
@mtscout6 @clayreimann any update on my above question? |
That dist folder is generated during the CI. With the CI failing and not publishing to npm that's your problem. I have not had time to dig into the cause of the CI failure, and I do not have permissions to push directly to npm bypassing CI. I wish I could say that I had the time to look at it, but I don't for some time. |
Would be nice to be able to fetch only a page of repositories, repo commits, and other lists instead of fetching the entire thing every time. Currently they call into _requestAllPages which automatically fetches everything from github, which can take awhile for long lists.
@mtscout6 suggested on gitter that a generator function would be a good way to accomplish this.
If there's a good direction to go in, I can probably work on this.
The text was updated successfully, but these errors were encountered: