2 Commits

Author SHA1 Message Date
702a90e864 #3 show http error for playing cmd
Some checks failed
Compile and test using leiningen / Run tests (push) Has been cancelled
2026-02-24 00:36:04 +01:00
c8ce6fea5a #3 check if there is a valid key before get matches
Some checks failed
Compile and test using leiningen / Run tests (push) Has been cancelled
2026-02-24 00:29:08 +01:00
2 changed files with 15 additions and 8 deletions

View File

@@ -527,7 +527,7 @@
(comment
(set-riot-api-key :RIOT_DEV_KEY "RGAPI-bbbed5c8-d4d7-4de4-a7e7-b8366afee5a4")
(set-riot-api-key :RIOT_DEV_KEY "RGAPI-85aa58ae-ab2a-4092-823b-f9ff6e346916")
(deref (:RIOT_DEV_KEY RIOT-KEYS))
(call-riot-api :lol-account-by-riot-id :path-params {:player-name "Walid Georgey"

View File

@@ -214,12 +214,14 @@
tft-puuid (get-tft-puuid player-name player-tag)]
(when @debug (println "get-matches Params") (pp/pprint call-params))
(cond-> []
lol (concat (filter-by-dates
call-params (map #(add-calculated-data lol-puuid (get-lol-match-data %))
(get-lol-matches lol-puuid call-params))))
tft (concat (filter-by-dates
call-params (map #(add-calculated-data tft-puuid (get-tft-match-data %))
(get-tft-matches tft-puuid call-params)))))))
(and lol (some? lol-puuid))
(concat (filter-by-dates
call-params (map #(add-calculated-data lol-puuid (get-lol-match-data %))
(get-lol-matches lol-puuid call-params))))
(and tft (some? tft-puuid))
(concat (filter-by-dates
call-params (map #(add-calculated-data tft-puuid (get-tft-match-data %))
(get-tft-matches tft-puuid call-params)))))))
(comment
(reset! debug true)
@@ -242,7 +244,12 @@
(let [response (call-riot-api :tft-spectator
:path-params {:puuid puuid})
http-code (:http-code response)]
(= 200 http-code)))
(cond
(= 200 http-code) true
(= 404 http-code) false
:else (str "unknown, error " http-code))
))
(defn create-playing