Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative API #1200

Merged
merged 4 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .zshrc

This file was deleted.

6 changes: 6 additions & 0 deletions gamestonk_terminal/alternative/alt_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Alt context API."""
# flake8: noqa
# pylint: disable=unused-import

# Context menus
from .covid import covid_api as covid
17 changes: 17 additions & 0 deletions gamestonk_terminal/alternative/covid/covid_api.py
Original file line number Diff line number Diff line change
@@ -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__)))
8 changes: 5 additions & 3 deletions gamestonk_terminal/alternative/covid/covid_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
)


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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -164,7 +166,7 @@ def display_country_slopes(
ascend: bool = False,
threshold: int = 10000,
export: str = "",
):
) -> None:
"""

Parameters
Expand Down
1 change: 1 addition & 0 deletions gamestonk_terminal/api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# flake8: noqa
# pylint: disable=unused-import
from .stocks import stocks_api as stocks
from .alternative import alt_api as alt