Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ client = Zeroentropy()
all_documents = []
# Automatically fetches more pages as needed.
for document in client.documents.get_info_list(
collection_name="collection_name",
collection_name="example_collection",
):
# Do something with document here
all_documents.append(document)
Expand All @@ -121,7 +121,7 @@ async def main() -> None:
all_documents = []
# Iterate through items across all pages, issuing requests as needed.
async for document in client.documents.get_info_list(
collection_name="collection_name",
collection_name="example_collection",
):
all_documents.append(document)
print(all_documents)
Expand All @@ -134,7 +134,7 @@ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get

```python
first_page = await client.documents.get_info_list(
collection_name="collection_name",
collection_name="example_collection",
)
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
Expand All @@ -148,7 +148,7 @@ Or just work directly with the returned data:

```python
first_page = await client.documents.get_info_list(
collection_name="collection_name",
collection_name="example_collection",
)

print(f"next page cursor: {first_page.id_gt}") # => "next page cursor: ..."
Expand Down