Skip to content

Commit 699941e

Browse files
committed
Add accurate history endpoint defaults
1 parent 52e223b commit 699941e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

terminusdb_client/client/Client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def get_document_history(
569569
team: Optional[str] = None,
570570
db: Optional[str] = None,
571571
start: int = 0,
572-
count: int = -1,
572+
count: int = 10,
573573
created: bool = False,
574574
updated: bool = False,
575575
) -> list:
@@ -590,7 +590,7 @@ def get_document_history(
590590
start : int, optional
591591
Starting index for pagination. Defaults to 0.
592592
count : int, optional
593-
Maximum number of history entries to return. Defaults to -1 (all).
593+
Maximum number of history entries to return. Defaults to 10.
594594
created : bool, optional
595595
If True, return only the creation time. Defaults to False.
596596
updated : bool, optional

terminusdb_client/tests/test_Client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,6 @@ def test_get_document_history_with_created_updated(mocked_get, mocked_head):
745745
# Get the last call to get (should be our get_document_history call)
746746
last_call = client._session.get.call_args_list[-1]
747747
assert last_call[0][0] == "http://localhost:6363/api/history/admin/myDBName"
748-
assert last_call[1]["params"] == {"id": "Person/Jane", "start": 0, "count": -1, "created": True, "updated": True}
748+
assert last_call[1]["params"] == {"id": "Person/Jane", "start": 0, "count": 10, "created": True, "updated": True}
749749
assert last_call[1]["headers"] == {"user-agent": f"terminusdb-client-python/{__version__}"}
750750
assert last_call[1]["auth"] == ("admin", "root")

0 commit comments

Comments
 (0)