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:
Colin Delahunty
2022-01-16 20:36:51 -05:00
committed by GitHub
parent 0f2e0d60ff
commit 412ac77c48
5 changed files with 29 additions and 5 deletions

2
.zshrc vendored
View File

@@ -1,2 +0,0 @@
y

View File

@@ -0,0 +1,6 @@
"""Alt context API."""
# flake8: noqa
# pylint: disable=unused-import
# Context menus
from .covid import covid_api as covid

View 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__)))

View 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

View File

@@ -1,3 +1,4 @@
# flake8: noqa
# pylint: disable=unused-import
from .stocks import stocks_api as stocks
from .alternative import alt_api as alt