diff options
Diffstat (limited to 'openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py')
-rw-r--r-- | openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py b/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py index 5e865f3dc23..5888217c4de 100644 --- a/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py +++ b/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py @@ -1,7 +1,10 @@ """Benzinga Company News Model.""" import math -from datetime import datetime +from datetime import ( + date as dateType, + datetime, +) from typing import Any, Dict, List, Literal, Optional from openbb_core.provider.abstract.fetcher import Fetcher @@ -9,6 +12,7 @@ from openbb_core.provider.standard_models.company_news import ( CompanyNewsData, CompanyNewsQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.helpers import amake_requests, get_querystring from pydantic import Field, field_validator @@ -28,20 +32,13 @@ class BenzingaCompanyNewsQueryParams(CompanyNewsQueryParams): "updated_since": "updatedSince", "published_since": "publishedSince", } - + date: Optional[dateType] = Field( + default=None, description=QUERY_DESCRIPTIONS.get("date", "") + ) display: Literal["headline", "abstract", "full"] = Field( default="full", description="Specify headline only (headline), headline + teaser (abstract), or headline + full body (full).", ) - date: Optional[str] = Field( - default=None, description="Date of the news to retrieve." - ) - start_date: Optional[str] = Field( - default=None, description="Start date of the news to retrieve." - ) - end_date: Optional[str] = Field( - default=None, description="End date of the news to retrieve." - ) updated_since: Optional[int] = Field( default=None, description="Number of seconds since the news was updated.", @@ -171,6 +168,7 @@ class BenzingaCompanyNewsFetcher( return data[: query.limit] + # pylint: disable=unused-argument @staticmethod def transform_data( query: BenzingaCompanyNewsQueryParams, |