Feature: pagination with `link` header
I would expect the following to work:
github.paginate(github.rest.orgs.list_webhook_deliveries, hook_org, hook_id)
But currently, those values are passed to page/per_page. It seems like the only way to pass positional args is by manually specifying page/per_page/map_func?
You can pass them with kwargs:
github.paginate(github.rest.orgs.list_webhook_deliveries, org=hook_org, hook_id=hook_id)
It seem this list_webhook_deliveries api uses cursor/per_page pagination. Currently, githubkit's paginator is based on page/per_page. May be you should handle the pagination yourself now.
I know I can pass as kwargs, but the signature has *args: P.args, so I would expect positional arguments to work too. If they're not intended to work, it should either be removed or documented how to use them.
It seem this
list_webhook_deliveriesapi uses cursor/per_page pagination. Currently, githubkit's paginator is based on page/per_page. May be you should handle the pagination yourself now.
Noted. Can work around for now. Would it be possible to add support for this?
After taking a look at the latest docs, GitHub can now uses the link header to do pagination. Octokit also supports this now (ref).
I will try to implement this.
Broke out positional args into a separate issue.
Also, should the type of github.paginate be updated to check that the function as page/per_page arguments? Otherwise, it'll fail at runtime.
Perhaps use Protocol instead of ParamSpec?