Skip to content

Commit f47d090

Browse files
committed
fix: Remove unnecessary params
1 parent baca684 commit f47d090

File tree

1 file changed

+2
-69
lines changed

1 file changed

+2
-69
lines changed

asknews_sdk/api/news.py

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ def get_index_counts(
269269
reverse_string_guarantee: Optional[List[str]] = None,
270270
entity_guarantee: Optional[List[str]] = None,
271271
entity_guarantee_op: Optional[str] = "OR",
272-
return_graphs: Optional[bool] = False,
273-
return_geo: Optional[bool] = False,
274272
countries: Optional[List[str]] = None,
275273
countries_blacklist: Optional[List[str]] = None,
276274
languages: Optional[List[str]] = None,
@@ -335,8 +333,6 @@ def get_index_counts(
335333
"reverse_string_guarantee": reverse_string_guarantee,
336334
"entity_guarantee": entity_guarantee,
337335
"entity_guarantee_op": entity_guarantee_op,
338-
"return_graphs": return_graphs,
339-
"return_geo": return_geo,
340336
"countries": countries,
341337
"countries_blacklist": countries_blacklist,
342338
"languages": languages,
@@ -562,8 +558,6 @@ async def search_news(
562558
reverse_string_guarantee: Optional[List[str]] = None,
563559
entity_guarantee: Optional[List[str]] = None,
564560
entity_guarantee_op: Optional[str] = "OR",
565-
return_graphs: Optional[bool] = False,
566-
return_geo: Optional[bool] = False,
567561
countries: Optional[List[str]] = None,
568562
countries_blacklist: Optional[List[str]] = None,
569563
languages: Optional[List[str]] = None,
@@ -574,64 +568,9 @@ async def search_news(
574568
http_headers: Optional[Dict] = None,
575569
) -> SearchResponse:
576570
"""
577-
Search for news articles given a query.
578-
579-
https://docs.asknews.app/en/reference#get-/v1/news/search
571+
Get time-series counts for a filter
580572
581-
:param query: Query string that can be any phrase, keyword, question, or
582-
paragraph.
583-
If method='nl', then this will be used as a natural language query.
584-
If method='kw', then this will be used as a direct keyword query.
585-
:type query: str
586-
:param n_articles: Number of articles to return, defaults to 10
587-
:type n_articles: Optional[int]
588-
:param start_timestamp: Start timestamp to search from, defaults to None
589-
:type start_timestamp: Optional[int]
590-
:param end_timestamp: End timestamp to search to, defaults to None
591-
:type end_timestamp: Optional[int]
592-
:param return_type: Type of return value. 'string' means that the return is
593-
prompt-optimized and ready to be immediately injected into any prompt.
594-
'dicts' means that the return is a structured dictionary, containing more
595-
information such as full article content, and additional metadata (like a
596-
classic news api). Can be 'string' or 'dicts', or 'both', defaults to
597-
"dicts".
598-
:type return_type: Literal["string", "dicts", "both"]
599-
:param historical: Search on archive of historical news. Defaults to False,
600-
meaning that the search will only look through the most recent news
601-
(48 hours)
602-
:type historical: bool
603-
:param method: Method to use for searching. Both `kw` and `nl`
604-
support natural language queries. `kw` tries to match keywords,
605-
while `nl` tries to match the meaning of the query.
606-
:type method: Literal["nl", "kw"]
607-
:param similarity_score_threshold: Similarity score threshold, defaults to 0.5
608-
:type similarity_score_threshold: float
609-
:param offset: Offset for pagination
610-
:type offset: int
611-
:param categories: Categories of news to filter on, defaults to ["All"]
612-
:type categories: Optional[List[
613-
Literal[
614-
"All", "Business", "Crime", "Politics", "Science", "Sports",
615-
"Technology", "Military", "Health", "Entertainment", "Finance",
616-
"Culture", "Climate", "Environment", "World"
617-
]
618-
]]
619-
:param doc_start_delimiter: Document start delimiter, defaults to "<doc>"
620-
:type doc_start_delimiter: str
621-
:param doc_end_delimiter: Document end delimiter, defaults to "</doc>"
622-
:type doc_end_delimiter: str
623-
:param provocative: Provocative, defaults to "all"
624-
:type provocative: Optional[str]
625-
:param reporting_voice: Reporting voice, defaults to "all"
626-
:type reporting_voice: Optional[str]
627-
:param domain_url: Domain URL, defaults to None
628-
:type domain_url: Optional[str]
629-
:param page_rank: Page rank, defaults to None
630-
:type page_rank: Optional[int]
631-
:param http_headers: Additional HTTP headers.
632-
:type http_headers: Optional[Dict]
633-
:return: The search response.
634-
:rtype: SearchResponse
573+
https://docs.asknews.app/en/reference#get-/v1/index_counts
635574
"""
636575
response = await self.client.request(
637576
method="GET",
@@ -663,8 +602,6 @@ async def search_news(
663602
"reverse_string_guarantee": reverse_string_guarantee,
664603
"entity_guarantee": entity_guarantee,
665604
"entity_guarantee_op": entity_guarantee_op,
666-
"return_graphs": return_graphs,
667-
"return_geo": return_geo,
668605
"countries": countries,
669606
"countries_blacklist": countries_blacklist,
670607
"languages": languages,
@@ -714,8 +651,6 @@ async def get_index_counts(
714651
reverse_string_guarantee: Optional[List[str]] = None,
715652
entity_guarantee: Optional[List[str]] = None,
716653
entity_guarantee_op: Optional[str] = "OR",
717-
return_graphs: Optional[bool] = False,
718-
return_geo: Optional[bool] = False,
719654
countries: Optional[List[str]] = None,
720655
countries_blacklist: Optional[List[str]] = None,
721656
languages: Optional[List[str]] = None,
@@ -779,8 +714,6 @@ async def get_index_counts(
779714
"reverse_string_guarantee": reverse_string_guarantee,
780715
"entity_guarantee": entity_guarantee,
781716
"entity_guarantee_op": entity_guarantee_op,
782-
"return_graphs": return_graphs,
783-
"return_geo": return_geo,
784717
"countries": countries,
785718
"countries_blacklist": countries_blacklist,
786719
"languages": languages,

0 commit comments

Comments
 (0)