validator -> field_validator, a3'd everything

This commit is contained in:
tehcoderer
2023-10-16 14:54:04 -04:00
parent fdbc6d7e1f
commit 9203900529
114 changed files with 2931 additions and 6829 deletions

View File

@@ -1,14 +1,14 @@
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
from typing import List, Literal, Union
from typing import List, Literal, Optional
import typing_extensions
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
from openbb_core.app.model.obbject import OBBject
from openbb_core.app.static.container import Container
from openbb_core.app.static.decorators import validate
from openbb_core.app.static.filters import filter_inputs
from openbb_provider.abstract.data import Data
from typing_extensions import Annotated
class ROUTER_news(Container):
@@ -22,57 +22,57 @@ class ROUTER_news(Container):
@validate
def globalnews(
self,
limit: typing_extensions.Annotated[
limit: Annotated[
int, OpenBBCustomParameter(description="Number of articles to return.")
] = 20,
provider: Union[Literal["benzinga", "fmp", "intrinio"], None] = None,
**kwargs
provider: Optional[Literal["benzinga", "fmp", "intrinio"]] = None,
**kwargs,
) -> OBBject[List[Data]]:
"""Global News.
"""Global News. Global news data.
Parameters
----------
limit : int
Number of articles to return.
provider : Union[Literal['benzinga', 'fmp', 'intrinio'], None]
provider : Optional[Literal['benzinga', 'fmp', 'intrinio']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'benzinga' if there is
no default.
display : Literal['headline', 'abstract', 'full']
Specify headline only (headline), headline + teaser (abstract), or headline + full body (full). (provider: benzinga)
date : Optional[Union[str]]
date : Optional[str]
Date of the news to retrieve. (provider: benzinga)
start_date : Optional[Union[str]]
start_date : Optional[str]
Start date of the news to retrieve. (provider: benzinga)
end_date : Optional[Union[str]]
end_date : Optional[str]
End date of the news to retrieve. (provider: benzinga)
updated_since : Optional[Union[int]]
updated_since : Optional[int]
Number of seconds since the news was updated. (provider: benzinga)
published_since : Optional[Union[int]]
published_since : Optional[int]
Number of seconds since the news was published. (provider: benzinga)
sort : Optional[Union[Literal['id', 'created', 'updated']]]
sort : Optional[Literal['id', 'created', 'updated']]
Key to sort the news by. (provider: benzinga)
order : Optional[Union[Literal['asc', 'desc']]]
order : Optional[Literal['asc', 'desc']]
Order to sort the news by. (provider: benzinga)
isin : Optional[Union[str]]
isin : Optional[str]
The ISIN of the news to retrieve. (provider: benzinga)
cusip : Optional[Union[str]]
cusip : Optional[str]
The CUSIP of the news to retrieve. (provider: benzinga)
channels : Optional[Union[str]]
channels : Optional[str]
Channels of the news to retrieve. (provider: benzinga)
topics : Optional[Union[str]]
topics : Optional[str]
Topics of the news to retrieve. (provider: benzinga)
authors : Optional[Union[str]]
authors : Optional[str]
Authors of the news to retrieve. (provider: benzinga)
content_types : Optional[Union[str]]
content_types : Optional[str]
Content types of the news to retrieve. (provider: benzinga)
Returns
-------
OBBject
results : Union[List[GlobalNews]]
results : List[GlobalNews]
Serializable results.
provider : Union[Literal['benzinga', 'fmp', 'intrinio'], None]
provider : Optional[Literal['benzinga', 'fmp', 'intrinio']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -87,31 +87,29 @@ class ROUTER_news(Container):
Published date of the news.
title : str
Title of the news.
image : Optional[Union[str]]
Image URL of the news.
text : Optional[Union[str]]
images : Optional[List[Dict[str, str]]]
Images associated with the news.
text : Optional[str]
Text/body of the news.
url : Optional[Union[str]]
url : Optional[str]
URL of the news.
id : Optional[Union[str]]
id : Optional[str]
ID of the news. (provider: benzinga); Article ID. (provider: intrinio)
author : Optional[Union[str]]
author : Optional[str]
Author of the news. (provider: benzinga)
teaser : Optional[Union[str]]
teaser : Optional[str]
Teaser of the news. (provider: benzinga)
images : Optional[Union[List[Dict[str, str]]]]
Images associated with the news. (provider: benzinga)
channels : Optional[Union[str]]
channels : Optional[str]
Channels associated with the news. (provider: benzinga)
stocks : Optional[Union[str]]
stocks : Optional[str]
Stocks associated with the news. (provider: benzinga)
tags : Optional[Union[str]]
tags : Optional[str]
Tags associated with the news. (provider: benzinga)
updated : Optional[Union[datetime]]
updated : Optional[datetime]
None
site : Optional[Union[str]]
site : Optional[str]
Site of the news. (provider: fmp)
company : Optional[Union[Dict[str, Any]]]
company : Optional[Dict[str, Any]]
Company details related to the news article. (provider: intrinio)""" # noqa: E501
inputs = filter_inputs(