summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPratyush Shukla <ps4534@nyu.edu>2024-02-04 21:12:36 +0530
committerGitHub <noreply@github.com>2024-02-04 15:42:36 +0000
commita5da32808c68e4a6269d9ac1de8011dd1cee976a (patch)
treef75456b42812eba1380c451be1e58a98752e40cb
parent6c2aa62a0f2581ed7c1ab7742adbd0d4796d076b (diff)
remove `SectorNews` from router and standard models (#6026)
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/sector_news.py43
-rw-r--r--openbb_platform/extensions/news/openbb_news/news_router.py11
2 files changed, 0 insertions, 54 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/sector_news.py b/openbb_platform/core/openbb_core/provider/standard_models/sector_news.py
deleted file mode 100644
index 61c2778ea55..00000000000
--- a/openbb_platform/core/openbb_core/provider/standard_models/sector_news.py
+++ /dev/null
@@ -1,43 +0,0 @@
-"""Sector News Standard Model."""
-
-from datetime import datetime
-from typing import Dict, List, Optional
-
-from pydantic import Field, NonNegativeInt
-
-from openbb_core.provider.abstract.data import Data
-from openbb_core.provider.abstract.query_params import QueryParams
-from openbb_core.provider.utils.descriptions import (
- DATA_DESCRIPTIONS,
- QUERY_DESCRIPTIONS,
-)
-
-
-class SectorNewsQueryParams(QueryParams):
- """Sector News Query."""
-
- sectors: str = Field(
- min_length=1,
- description="A coma separated list of sectors.",
- )
-
- limit: NonNegativeInt = Field(
- default=20,
- description=QUERY_DESCRIPTIONS.get("limit", "")
- + " Here it is the no. of articles to return.",
- )
-
-
-class SectorNewsData(Data):
- """Sector News Data."""
-
- date: datetime = Field(
- description=DATA_DESCRIPTIONS.get("date", "")
- + " Here it is the published date of the news."
- )
- title: str = Field(description="Title of the news.")
- images: Optional[List[Dict[str, str]]] = Field(
- default=None, description="Images associated with the news."
- )
- text: Optional[str] = Field(default=None, description="Text/body of the news.")
- url: Optional[str] = Field(default=None, description="URL of the news.")
diff --git a/openbb_platform/extensions/news/openbb_news/news_router.py b/openbb_platform/extensions/news/openbb_news/news_router.py
index 178ae242aac..742b922a383 100644
--- a/openbb_platform/extensions/news/openbb_news/news_router.py
+++ b/openbb_platform/extensions/news/openbb_news/news_router.py
@@ -35,14 +35,3 @@ async def company(
) -> OBBject[BaseModel]:
"""Company News. Get news for one or more companies."""
return await OBBject.from_query(Query(**locals()))
-
-
-@router.command(model="SectorNews")
-async def sector(
- cc: CommandContext,
- provider_choices: ProviderChoices,
- standard_params: StandardParams,
- extra_params: ExtraParams,
-) -> OBBject[BaseModel]:
- """Sector News. Get news for one or more sectors."""
- return await OBBject.from_query(Query(**locals()))