Skip to content

Commit ca32ecb

Browse files
committed
Restrict fromDate and toDate to date only type
1 parent d6bc215 commit ca32ecb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

linkup/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
import os
3-
from datetime import datetime
3+
from datetime import date
44
from typing import Any, Dict, Literal, Optional, Type, Union
55

66
import httpx
@@ -52,8 +52,8 @@ def search(
5252
output_type: Literal["searchResults", "sourcedAnswer", "structured"],
5353
structured_output_schema: Union[Type[BaseModel], str, None] = None,
5454
include_images: bool = False,
55-
from_date: Union[datetime, None] = None,
56-
to_date: Union[datetime, None] = None,
55+
from_date: Union[date, None] = None,
56+
to_date: Union[date, None] = None,
5757
) -> Any:
5858
"""
5959
Search for a query in the Linkup API.
@@ -278,8 +278,8 @@ def _get_search_params(
278278
output_type: Literal["searchResults", "sourcedAnswer", "structured"],
279279
structured_output_schema: Union[Type[BaseModel], str, None],
280280
include_images: bool,
281-
from_date: Union[datetime, None] = None,
282-
to_date: Union[datetime, None] = None,
281+
from_date: Union[date, None] = None,
282+
to_date: Union[date, None] = None,
283283
) -> Dict[str, Union[str, bool]]:
284284
params: Dict[str, Union[str, bool]] = dict(
285285
q=query,

0 commit comments

Comments
 (0)