From 05c50e401d9df7bcbe8c36d55032d034fdcb8e22 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Tue, 15 Nov 2022 19:00:11 +0100 Subject: [PATCH] - GetUserPoints(game, user) --- jscore.cpp | 4 ++++ jscore.h | 1 + 2 files changed, 5 insertions(+) diff --git a/jscore.cpp b/jscore.cpp index 080d6c2..2b2676a 100644 --- a/jscore.cpp +++ b/jscore.cpp @@ -132,6 +132,10 @@ namespace jscore { return not jscore_error; } + const int getUserPoints(string game, std::string user) { + return atoi(sendRequest("GET /getuserpoints.php?game=" + game + "&user=" + user).c_str()); + } + string getUserData(string game, string user) { return sendRequest("GET /getuserdata.php?game=" + game + "&user=" + user); } diff --git a/jscore.h b/jscore.h index 089d7b5..43feb9b 100644 --- a/jscore.h +++ b/jscore.h @@ -6,6 +6,7 @@ namespace jscore { const int getNumUsers(); std::string getUserName(const int index); const int getPoints(const int index); + const int getUserPoints(std::string game, std::string user); const bool updateUserPoints(std::string game, std::string user, const int points); std::string getUserData(std::string game, std::string user);