mirror of
https://github.com/tiennm99/loldle.git
synced 2026-10-18 20:14:47 +00:00
feat: auto-detect latest champions version from Riot API
When championsVersion is empty, fetch the latest version from ddragon.leagueoflegends.com instead of requiring a hardcoded value.
This commit is contained in:
1 parent
a12b5d2b5d
commit
eddcfe25fa
2 files changed
+38
-2
No files matched your search
+7
-1
@@ -11,7 +11,13 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
champions, err := parser.ParseChampions(championsVersion)
|
||||
version, err := getChampionsVersion()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to get champions version: %v", err)
|
||||
}
|
||||
fmt.Printf("Using champions version: %s\n", version)
|
||||
|
||||
champions, err := parser.ParseChampions(version)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to parse champions: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user