From 9c280e05547671aa346530c4c7c0ddbc4729348f Mon Sep 17 00:00:00 2001 From: Aotrix Date: Sat, 8 Mar 2025 23:13:49 +0100 Subject: added std::string output --- include/hearthstoneAPIHandler.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/hearthstoneAPIHandler.h') diff --git a/include/hearthstoneAPIHandler.h b/include/hearthstoneAPIHandler.h index 718b98c..c752f6e 100644 --- a/include/hearthstoneAPIHandler.h +++ b/include/hearthstoneAPIHandler.h @@ -5,10 +5,10 @@ class HearthstoneAPIHandler { public: HearthstoneAPIHandler(); - void get_cards(const std::string &t_card_parameters); + std::string get_cards(const std::string &t_card_parameters); private: - static size_t curl_callback_token_request(void *t_contents, size_t t_size, + static size_t curl_callback_string_output(void *t_contents, size_t t_size, size_t t_nmemb, std::string *t_s); std::chrono::hours get_current_time(); std::string extract_string_with_regex(const std::string &t_str, @@ -20,9 +20,9 @@ class HearthstoneAPIHandler { const std::string get_url(const std::string &t_parameters); const std::string get_set_of_cards_url(const std::string &t_card_parameters); - void make_api_request(const char *t_url, const char *t_header); - void make_api_request(const std::string &t_url, - const std::string &t_header); + 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; -- cgit v1.2.3