riotskillissue 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- riotskillissue/cli.py +57 -1
- riotskillissue/tui.py +733 -0
- {riotskillissue-0.1.3.dist-info → riotskillissue-0.1.4.dist-info}/METADATA +6 -4
- {riotskillissue-0.1.3.dist-info → riotskillissue-0.1.4.dist-info}/RECORD +7 -6
- riotskillissue-0.1.4.dist-info/licenses/LICENSE +21 -0
- riotskillissue-0.1.3.dist-info/licenses/LICENSE +0 -676
- {riotskillissue-0.1.3.dist-info → riotskillissue-0.1.4.dist-info}/WHEEL +0 -0
- {riotskillissue-0.1.3.dist-info → riotskillissue-0.1.4.dist-info}/entry_points.txt +0 -0
riotskillissue/cli.py
CHANGED
|
@@ -6,7 +6,10 @@ from rich import print as rprint
|
|
|
6
6
|
from .core.client import RiotClient, RiotClientConfig
|
|
7
7
|
from .core.types import Region
|
|
8
8
|
|
|
9
|
-
app = typer.Typer(
|
|
9
|
+
app = typer.Typer(
|
|
10
|
+
help="RiotSkillIssue API Wrapper CLI",
|
|
11
|
+
rich_markup_mode="rich",
|
|
12
|
+
)
|
|
10
13
|
console = Console()
|
|
11
14
|
|
|
12
15
|
@app.command()
|
|
@@ -80,5 +83,58 @@ def match(match_id: str, region: str = "americas", api_key: str = typer.Option(N
|
|
|
80
83
|
|
|
81
84
|
asyncio.run(_run())
|
|
82
85
|
|
|
86
|
+
|
|
87
|
+
@app.command()
|
|
88
|
+
def live(
|
|
89
|
+
name: str = typer.Argument(
|
|
90
|
+
...,
|
|
91
|
+
help='Riot ID in format "GameName#TagLine" (e.g. "Agurin#EUW")',
|
|
92
|
+
),
|
|
93
|
+
region: str = typer.Option(
|
|
94
|
+
"euw1",
|
|
95
|
+
help="Regional server (e.g. euw1, na1, kr)",
|
|
96
|
+
),
|
|
97
|
+
api_key: str = typer.Option(
|
|
98
|
+
None,
|
|
99
|
+
envvar="RIOT_API_KEY",
|
|
100
|
+
help="Riot API key (or set RIOT_API_KEY env var)",
|
|
101
|
+
),
|
|
102
|
+
refresh: int = typer.Option(
|
|
103
|
+
30,
|
|
104
|
+
help="Auto-refresh interval in seconds",
|
|
105
|
+
),
|
|
106
|
+
):
|
|
107
|
+
"""🎮 Launch the Live Game TUI for a League of Legends match.
|
|
108
|
+
|
|
109
|
+
Shows a real-time terminal dashboard with both teams, champion picks,
|
|
110
|
+
summoner spells, ranks, and win rates. Auto-refreshes periodically.
|
|
111
|
+
|
|
112
|
+
\b
|
|
113
|
+
Examples:
|
|
114
|
+
riotskillissue-cli live "Agurin#EUW" --region euw1
|
|
115
|
+
riotskillissue-cli live "Faker#KR1" --region kr
|
|
116
|
+
riotskillissue-cli live "Player#NA1" --region na1 --refresh 15
|
|
117
|
+
"""
|
|
118
|
+
if not api_key:
|
|
119
|
+
rprint("[red]Error: API key required. Set RIOT_API_KEY env var or use --api-key.[/red]")
|
|
120
|
+
raise typer.Exit(code=1)
|
|
121
|
+
|
|
122
|
+
if "#" not in name:
|
|
123
|
+
rprint('[red]Error: Name must be in format "GameName#TagLine" (e.g. "Agurin#EUW").[/red]')
|
|
124
|
+
raise typer.Exit(code=1)
|
|
125
|
+
|
|
126
|
+
game_name, tag_line = name.split("#", 1)
|
|
127
|
+
|
|
128
|
+
from .tui import run_tui
|
|
129
|
+
|
|
130
|
+
run_tui(
|
|
131
|
+
api_key=api_key,
|
|
132
|
+
game_name=game_name,
|
|
133
|
+
tag_line=tag_line,
|
|
134
|
+
region=region,
|
|
135
|
+
auto_refresh=refresh,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
83
139
|
def main():
|
|
84
140
|
app()
|