diff options
| author | Aotrix <[email protected]> | 2025-10-01 19:46:58 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-10-01 19:46:58 +0200 |
| commit | 79453ffc82f75cf0af0537474923e7b112aa2f87 (patch) | |
| tree | 32bcf37eb65d24513290849ed77c5d5deb9757d5 /src/postgresHandler.cpp | |
| parent | e0d4ce7dcebe3230993bd9488723ce8766e6918d (diff) | |
added more FOLDERS
Diffstat (limited to 'src/postgresHandler.cpp')
| -rw-r--r-- | src/postgresHandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/postgresHandler.cpp b/src/postgresHandler.cpp index c0276f1..8ca3c20 100644 --- a/src/postgresHandler.cpp +++ b/src/postgresHandler.cpp @@ -1,6 +1,6 @@ #include "postgresHandler.hpp" #include "cardTypeHandlerInfo.hpp" -#include "hearthstoneAPIHandler.hpp" +#include "hearthstoneAPI.hpp" #include <cctype> #include <cstddef> #include <cstdint> @@ -125,7 +125,7 @@ const std::string::size_type endPosOfCardJSON(const std::string &kCardsPageJSON, return kCardsPageJSON.find("}", kSearchStartPos); } -void addCardsToDatabase(HearthstoneAPIHandler &aAPIIntermediate, pqxx::work &aTransaction, +void addCardsToDatabase(HearthstoneAPI &aAPIIntermediate, pqxx::work &aTransaction, const std::string &kURLOfCardsPage) { const std::regex aRegexKeyValueInJSON = regexKeyValueInJSON(); const std::string &kCardsPageJSON = aAPIIntermediate.get_cards(kURLOfCardsPage); @@ -155,7 +155,7 @@ void refresh_cards_table() { pqxx::connection aConnection{ "postgresql://aotrix@localhost:5432/hearthstonegameinfo"}; // FIXME: load a .xml file instead pqxx::work aTransaction{aConnection}; - HearthstoneAPIHandler aAPIConnector; + HearthstoneAPI aAPIConnector; std::string aCards = aAPIConnector.get_cards("/?locale=fr_FR&gameMode=constructed"); // FIXME: use a struct as a parameter clearCardDatabase(aTransaction); |
