mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-25 10:42:58 +00:00
Alternative API (#1200)
* Look into controllers * Added alt API Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
This commit is contained in:
6
gamestonk_terminal/alternative/alt_api.py
Normal file
6
gamestonk_terminal/alternative/alt_api.py
Normal file
@@ -0,0 +1,6 @@
|
||||
"""Alt context API."""
|
||||
# flake8: noqa
|
||||
# pylint: disable=unused-import
|
||||
|
||||
# Context menus
|
||||
from .covid import covid_api as covid
|
||||
17
gamestonk_terminal/alternative/covid/covid_api.py
Normal file
17
gamestonk_terminal/alternative/covid/covid_api.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Insider Trading API."""
|
||||
import os
|
||||
from gamestonk_terminal.helper_classes import ModelsNamespace as _models
|
||||
|
||||
# flake8: noqa
|
||||
# pylint: disable=unused-import
|
||||
|
||||
# Menu commands
|
||||
from gamestonk_terminal.alternative.covid.covid_view import display_covid_ov as ov
|
||||
from gamestonk_terminal.alternative.covid.covid_view import display_covid_stat as stat
|
||||
from gamestonk_terminal.alternative.covid.covid_view import (
|
||||
display_country_slopes as slopes,
|
||||
)
|
||||
|
||||
|
||||
# Models
|
||||
models = _models(os.path.abspath(os.path.dirname(__file__)))
|
||||
@@ -18,7 +18,9 @@ from gamestonk_terminal.helper_funcs import (
|
||||
)
|
||||
|
||||
|
||||
def display_covid_ov(country, raw: bool = False, limit: int = 10, export: str = ""):
|
||||
def display_covid_ov(
|
||||
country, raw: bool = False, limit: int = 10, export: str = ""
|
||||
) -> None:
|
||||
"""Show historical cases and deaths by country
|
||||
|
||||
Parameters
|
||||
@@ -87,7 +89,7 @@ def display_covid_ov(country, raw: bool = False, limit: int = 10, export: str =
|
||||
|
||||
def display_covid_stat(
|
||||
country, stat: str = "cases", raw: bool = False, limit: int = 10, export: str = ""
|
||||
):
|
||||
) -> None:
|
||||
"""Show historical cases and deaths by country
|
||||
|
||||
Parameters
|
||||
@@ -164,7 +166,7 @@ def display_country_slopes(
|
||||
ascend: bool = False,
|
||||
threshold: int = 10000,
|
||||
export: str = "",
|
||||
):
|
||||
) -> None:
|
||||
"""
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# flake8: noqa
|
||||
# pylint: disable=unused-import
|
||||
from .stocks import stocks_api as stocks
|
||||
from .alternative import alt_api as alt
|
||||
|
||||
Reference in New Issue
Block a user