mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-12-01 13:44:16 +00:00
Merge branch 'develop' into feature/remove_unused_validators
This commit is contained in:
@@ -21,9 +21,9 @@ class WorldNewsQueryParams(QueryParams):
|
||||
"""World News Query."""
|
||||
|
||||
limit: NonNegativeInt = Field(
|
||||
default=20,
|
||||
default=2500,
|
||||
description=QUERY_DESCRIPTIONS.get("limit", "")
|
||||
+ " Here its the no. of articles to return.",
|
||||
+ " The number of articles to return.",
|
||||
)
|
||||
start_date: Optional[dateType] = Field(
|
||||
default=None, description=QUERY_DESCRIPTIONS.get("start_date", "")
|
||||
@@ -38,7 +38,7 @@ class WorldNewsQueryParams(QueryParams):
|
||||
"""Populate start date if empty."""
|
||||
if not v:
|
||||
now = datetime.now().date()
|
||||
v = now - relativedelta(years=1)
|
||||
v = now - relativedelta(weeks=2)
|
||||
return v
|
||||
|
||||
@field_validator("end_date", mode="before")
|
||||
@@ -55,11 +55,11 @@ class WorldNewsData(Data):
|
||||
|
||||
date: datetime = Field(
|
||||
description=DATA_DESCRIPTIONS.get("date", "")
|
||||
+ " Here it is the published date of the news."
|
||||
+ " The published date of the article."
|
||||
)
|
||||
title: str = Field(description="Title of the news.")
|
||||
title: str = Field(description="Title of the article.")
|
||||
images: Optional[List[Dict[str, str]]] = Field(
|
||||
default=None, description="Images associated with the news."
|
||||
default=None, description="Images associated with the article."
|
||||
)
|
||||
text: Optional[str] = Field(default=None, description="Text/body of the news.")
|
||||
url: Optional[str] = Field(default=None, description="URL of the news.")
|
||||
text: Optional[str] = Field(default=None, description="Text/body of the article.")
|
||||
url: Optional[str] = Field(default=None, description="URL to the article.")
|
||||
|
||||
Reference in New Issue
Block a user