fix: add overlay to remove nullable from pagination offset params (#121)

This commit is contained in:
Matt Apperson
2026-04-14 12:48:15 -04:00
committed by GitHub
parent 2bba049182
commit b2386114cd
440 changed files with 36150 additions and 32168 deletions
+30
View File
@@ -169,6 +169,36 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start Resource Management [resource-management] -->
## Resource Management