summaryrefslogtreecommitdiff
path: root/battleNetApi/src/hearthstoneApi.cpp
diff options
context:
space:
mode:
authorAotrix <[email protected]>2026-04-19 18:16:14 +0200
committerAotrix <[email protected]>2026-04-19 18:16:14 +0200
commitcc436cb44c60ef2485321e1e22b3ea0a59ee22af (patch)
treeb04464945278bcdc8915d8b3676b504a95e3f701 /battleNetApi/src/hearthstoneApi.cpp
parent8837de4783b25255b6a1799be210c9e580dd2d4f (diff)
TokenPool now works
Diffstat (limited to 'battleNetApi/src/hearthstoneApi.cpp')
-rw-r--r--battleNetApi/src/hearthstoneApi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/battleNetApi/src/hearthstoneApi.cpp b/battleNetApi/src/hearthstoneApi.cpp
index d6becc1..133f38d 100644
--- a/battleNetApi/src/hearthstoneApi.cpp
+++ b/battleNetApi/src/hearthstoneApi.cpp
@@ -104,7 +104,10 @@ std::vector<json> HearthstoneApi::makeApiRequest(const std::vector<std::string>
return aJsonOutputs;
}
-json HearthstoneApi::downloadCards(ApiUrl &iApiUrl, Token &iToken) {
+json HearthstoneApi::downloadCards(ApiUrl iApiUrl, const Token &iToken) {
+ if (iApiUrl.hasPage()) {
+ return makeApiRequest(iApiUrl, iToken.text());
+ }
iApiUrl.setPage("1");
std::vector<std::string> aRequests;