diff options
| author | Aotrix <[email protected]> | 2026-04-19 18:16:14 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-04-19 18:16:14 +0200 |
| commit | cc436cb44c60ef2485321e1e22b3ea0a59ee22af (patch) | |
| tree | b04464945278bcdc8915d8b3676b504a95e3f701 /battleNetApi/src/main.cpp | |
| parent | 8837de4783b25255b6a1799be210c9e580dd2d4f (diff) | |
TokenPool now works
Diffstat (limited to 'battleNetApi/src/main.cpp')
| -rw-r--r-- | battleNetApi/src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/battleNetApi/src/main.cpp b/battleNetApi/src/main.cpp index 4a5594c..2b6596a 100644 --- a/battleNetApi/src/main.cpp +++ b/battleNetApi/src/main.cpp @@ -21,7 +21,7 @@ class DefaultDownloadMethod : public DownloadMethod { aApiUrl.setLocale("fr_FR"); aApiUrl.setGameMode("constructed"); aApiUrl.setPageSize("100"); - std::optional<Token> aToken{TokenPool::unusedToken()}; + std::optional<Token> aToken{TokenPool::availableToken()}; if (aToken.has_value()) { HearthstoneApi::downloadCards(aApiUrl, aToken.value()); } @@ -51,12 +51,12 @@ int main(int argc, char *argv[]) { DownloaderContext aDownloaderContext; std::string aOutputJsonPath; if (argc < 4) { - TokenPool::fillTokenSource("tests/resources/credentials.json"); + TokenPool::feedTokenSource("tests/resources/credentials.json"); aDownloaderContext.setDownloadMethod(std::make_unique<DefaultDownloadMethod>()); aOutputJsonPath = "tests/output/list_of_cards.json"; } else { std::string aCredentialsFilePath{argv[1]}; - TokenPool::fillTokenSource(aCredentialsFilePath); + TokenPool::feedTokenSource(aCredentialsFilePath); aOutputJsonPath = argv[2]; } std::ofstream aOutputJsonFile(aOutputJsonPath); |
