summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAotrix <[email protected]>2026-01-01 03:35:41 +0100
committerAotrix <[email protected]>2026-01-01 03:35:41 +0100
commitc05901c38c6a77779807a6b224b9b624bfcaa5d3 (patch)
treefb8d212cd9995e4eecd351de352ea6aab2295924 /include
parenta56ae1a7ad5f624b05570965bed76e928bbd945c (diff)
removed useless files
Diffstat (limited to 'include')
-rw-r--r--include/cardTypeHandlerInfo.hpp21
-rw-r--r--include/hearthstoneAPI.hpp25
-rw-r--r--include/postgresHandler.hpp32
3 files changed, 0 insertions, 78 deletions
diff --git a/include/cardTypeHandlerInfo.hpp b/include/cardTypeHandlerInfo.hpp
deleted file mode 100644
index 82eb469..0000000
--- a/include/cardTypeHandlerInfo.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <functional>
-#include <string>
-
-class CardTypeHandlerInfo {
- public:
- CardTypeHandlerInfo() = default;
- ~CardTypeHandlerInfo() = default;
- CardTypeHandlerInfo(const CardTypeHandlerInfo &) = delete;
- CardTypeHandlerInfo(CardTypeHandlerInfo &&) = default;
- CardTypeHandlerInfo(
- const std::vector<std::string> &kCardTypeVector, const std::vector<std::string> &kCardValueRegexVector,
- const std::vector<std::function<const std::string(const std::string &)>> kJSONToSQLConverterVector);
-
- void addCardInfo(const std::string &kCardType, const std::string &kCardValueRegex,
- const std::function<const std::string(const std::string &)> kJSONToSQLConverter);
-
- private:
- std::vector<std::string> mCardType;
- std::vector<std::string> mCardValueRegex;
- std::vector<std::function<const std::string(const std::string &)>> mJSONToSQLConverter;
-};
diff --git a/include/hearthstoneAPI.hpp b/include/hearthstoneAPI.hpp
deleted file mode 100644
index f677080..0000000
--- a/include/hearthstoneAPI.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-#include <chrono>
-#include <string>
-
-class HearthstoneAPI {
- public:
- HearthstoneAPI();
- std::string get_cards(const std::string &t_card_parameters);
-
- private:
- static size_t curl_callback_string_output(void *t_contents, size_t t_size, size_t t_nmemb, std::string *t_s);
- std::chrono::seconds get_current_time();
- std::string extract_string_with_regex(const std::string &t_str, const std::string t_regex);
- void write_new_token_info_to_file(const std::string &t_file_path);
- void refresh_token_if_needed();
- std::string get_valid_token();
- std::string generate_request_header();
- const std::string get_url(const std::string &t_parameters);
- const std::string get_set_of_cards_url(const std::string &t_card_parameters);
- std::string make_api_request(const char *t_url, const char *t_header);
- std::string make_api_request(const std::string &t_url, const std::string &t_header);
-
- std::string m_access_token;
- std::string m_header;
-};
diff --git a/include/postgresHandler.hpp b/include/postgresHandler.hpp
deleted file mode 100644
index 444a50f..0000000
--- a/include/postgresHandler.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-#include "hearthstoneAPI.hpp"
-#include <pqxx/pqxx>
-#include <regex>
-
-/**
- * Execute a SQL query from a libpqxx transaction
- *
- * @param aTransaction The SQL transaction object used to execute the query
- * @param aQuery The SQL query
- * @return The result of the executed SQL query
- */
-const pqxx::result executeQuery(pqxx::work &aTransaction, std::string_view aQuery);
-
-/**
- * Get the type id of the value element in the "key": value regex match
- * For instance, if the regex match is "isZilliaxCosmeticModule":false
- * Then the type id is the one correponding to BOOL
- *
- * @param kSregexIt the regex match for a "key": value card information
- * @return the type identifier of the value element
- */
-const unsigned int getTypeIndexOfRegexIterator(const std::sregex_iterator &kSregexIt);
-/**
- * Add a list of cards (TODO: Complete documentation and function)
- *
- * @param kCards
- * @param aTransaction
- */
-void addCardsToDatabase(HearthstoneAPI &aAPIIntermediate, pqxx::work &aTransaction, const std::string &kURLOfCardsPage);
-
-void refresh_cards_table();