Skip to content

Commit 013956f

Browse files
authored
Add include_history parameter to Client search method (#13)
* Add include_history parameter to Client search method * Add vcrpy dependency to requirements-test.txt * Bump version to 1.0.4 * Update README to clarify include_history parameter behavior in Client search method
1 parent c97896e commit 013956f

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ client = Client(
123123
- `search_type` (SearchType): fisica or moral.
124124
- `search_list` (tuple[SearchList, ...]): Lists to search.
125125
If not provided, searches all.
126+
- `include_history` (bool | None): If `True`, include historical records; if `False`, only current; if `None`, use API default.
126127

127128
The search follows a hierarchical approach: it first attempts to find a match using the RFC.
128129
If no match is found, it searches by CURP. Finally, if neither is found, it looks for a match by name.

quienesquien/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ async def search(
6666
birthday: dt.date | None = None,
6767
search_type: SearchType | None = None,
6868
search_list: tuple[SearchList, ...] | None = None,
69+
include_history: bool | None = None,
6970
) -> list[Person]:
7071
"""Perform a search request and return the results.
7172
@@ -105,6 +106,7 @@ async def search(
105106
'birthday': birthday.strftime('%d/%m/%Y') if birthday else None,
106107
'type': search_type.value if search_type is not None else None,
107108
'list': ','.join(search_list) if search_list else None,
109+
'include_history': include_history,
108110
}
109111

110112
params = {k: v for k, v in params.items() if v is not None}

quienesquien/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.3'
1+
__version__ = '1.0.4'

requirements-test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ types-requests==2.*
99
pytest-asyncio==0.*
1010
pytest-mock==3.*
1111
respx==0.*
12+
vcrpy==7.0.*

0 commit comments

Comments
 (0)