diff options
| author | Aotrix <[email protected]> | 2025-11-11 18:02:09 +0100 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-11-11 18:02:09 +0100 |
| commit | 832e276e94d4d5a30885e6e352ffdd19f4f16f04 (patch) | |
| tree | baee5054a86f2c165d163fcf3231ba98e1246f8c /subprojects/battleNetApi/include | |
| parent | ea390f7ccf1abda93ebb80faa2bd8a79eb13c8c9 (diff) | |
added parameters
Diffstat (limited to 'subprojects/battleNetApi/include')
| -rw-r--r-- | subprojects/battleNetApi/include/apiUrl.hpp | 9 | ||||
| -rw-r--r-- | subprojects/battleNetApi/include/token.hpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/subprojects/battleNetApi/include/apiUrl.hpp b/subprojects/battleNetApi/include/apiUrl.hpp index cefce0b..12124c6 100644 --- a/subprojects/battleNetApi/include/apiUrl.hpp +++ b/subprojects/battleNetApi/include/apiUrl.hpp @@ -4,12 +4,15 @@ class ApiUrl { public: - ApiUrl(const std::string iContentType); - void setLocale(const std::string iLocale); - void setGameMode(const std::string iGameMode); + ApiUrl(const std::string &iContentType, const std::string &iRegion); + + void setRegion(const std::string &iRegion); + void setLocale(const std::string &iLocale); + void setGameMode(const std::string &iGameMode); std::string operator()(); private: std::string mContentType; + std::string mRegion; std::unordered_map<std::string, std::string> aParameters; }; diff --git a/subprojects/battleNetApi/include/token.hpp b/subprojects/battleNetApi/include/token.hpp index fc5e19a..def5dc2 100644 --- a/subprojects/battleNetApi/include/token.hpp +++ b/subprojects/battleNetApi/include/token.hpp @@ -18,7 +18,7 @@ class Token { void writeTokenToFile(const std::string &iToken) const; std::string getValidTokenWithApi() const; std::chrono::seconds getCurrentTime() const; - std::string extractFirstMatchRegex(const std::string &t_str, const std::string &t_regex) const; + std::string extractTokenWithRegex(const std::string &t_str, const std::string &t_regex) const; static size_t curlCallbackStringOutput(void *t_contents, size_t t_size, size_t t_nmemb, std::string *t_s); friend class TokenTests; |
