diff options
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); |
