summaryrefslogtreecommitdiff
path: root/battleNetApi/src
diff options
context:
space:
mode:
authorAotrix <[email protected]>2026-01-25 03:16:23 +0100
committerAotrix <[email protected]>2026-01-25 03:16:23 +0100
commitfeac00e6819a9c9ad640a586d2fabb9e4e43f41e (patch)
treed87ddf9e77d3a2fe3646425f2bea5838ad3b729b /battleNetApi/src
parent9465c64a517181b650c3b476752536ed9c49befb (diff)
renamed some functions
Diffstat (limited to 'battleNetApi/src')
-rw-r--r--battleNetApi/src/token.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/battleNetApi/src/token.cpp b/battleNetApi/src/token.cpp
index e32a946..21717cb 100644
--- a/battleNetApi/src/token.cpp
+++ b/battleNetApi/src/token.cpp
@@ -14,7 +14,7 @@ Token::Token(const std::string &iTokenFilePath) : mFilePath{iTokenFilePath}, mTo
std::string Token::text() const { return mToken; }
-const bool Token::hasTokenExpired() const {
+const bool Token::hasExpired() const {
std::ifstream aTokenFile{mFilePath};
json aCredentialsFile = json::parse(aTokenFile);
if (not aCredentialsFile.contains("Token") or not aCredentialsFile["Token"].contains("ExpirationTime") or
@@ -42,14 +42,14 @@ std::string Token::getTokenFromLocalFile() const {
}
std::string Token::generateToken() {
- if (hasTokenExpired()) {
+ if (hasExpired()) {
const std::pair<std::string, std::uint64_t> kTokenContent{getTokenWithApi()};
- writeNewTokenToLocalFile(kTokenContent);
+ writeTokenToLocalFile(kTokenContent);
}
return getTokenFromLocalFile();
}
-void Token::writeNewTokenToLocalFile(const std::pair<std::string, std::uint64_t> &iToken) const {
+void Token::writeTokenToLocalFile(const std::pair<std::string, std::uint64_t> &iToken) const {
std::ifstream aTokenFileInput{mFilePath};
json aCredentialsFile = json::parse(aTokenFileInput);
aCredentialsFile["Token"]["Content"] = iToken.first;