mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
added get private game server info route
This commit is contained in:
parent
b53b89d31a
commit
2f2d01713f
@ -42,14 +42,37 @@ namespace R5Net {
|
||||
|
||||
|
||||
////// Requests
|
||||
struct UpdateGameServerMSRequest
|
||||
struct UpdateGameServerMSRequest
|
||||
{
|
||||
NetGameServer gameServer;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(UpdateGameServerMSRequest, gameServer)
|
||||
};
|
||||
|
||||
enum class EResponseStatus
|
||||
struct GetIsUserBannedMSRequest
|
||||
{
|
||||
int oid;
|
||||
std::string ipAddress;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(GetIsUserBannedMSRequest, oid, ipAddress)
|
||||
};
|
||||
|
||||
struct GetPrivateGameServerInfoMSRequest
|
||||
{
|
||||
std::string publicRef;
|
||||
std::string password;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(GetPrivateGameServerInfoMSRequest, publicRef, password)
|
||||
};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Responses
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
|
||||
enum class EResponseStatus
|
||||
{
|
||||
NO_REACH,
|
||||
SUCCESS,
|
||||
@ -57,11 +80,9 @@ namespace R5Net {
|
||||
NOT_FOUND,
|
||||
MS_ERROR
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Responses
|
||||
/// </summary>
|
||||
struct DefaultMSResponse
|
||||
|
||||
|
||||
struct DefaultMSResponse
|
||||
{
|
||||
EResponseStatus status = EResponseStatus::NO_REACH;
|
||||
std::string error;
|
||||
@ -90,4 +111,19 @@ namespace R5Net {
|
||||
|
||||
};
|
||||
|
||||
struct GetIsUserBannedMSResponse : DefaultMSResponse
|
||||
{
|
||||
bool isBanned;
|
||||
std::string metaString;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(GetIsUserBannedMSResponse, isBanned, metaString)
|
||||
};
|
||||
|
||||
struct GetPrivateGameServerInfoMSResponse : DefaultMSResponse
|
||||
{
|
||||
NetGameServer gameServer;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(GetPrivateGameServerInfoMSResponse, gameServer)
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ namespace R5Net
|
||||
|
||||
R5NET_POST_ENDPOINT(UpdateMyGameServer, "/api/game_servers/update", UpdateGameServerMSRequest, UpdateGameServerMSResponse)
|
||||
R5NET_POST_ENDPOINT(GetClientIsBanned, "/api/ban_system/is_user_banned", GetIsUserBannedMSRequest, GetIsUserBannedMSResponse)
|
||||
R5NET_POST_ENDPOINT(GetPrivateGameServerInfo, "/api/game_servers/game_server_private_info", GetPrivateGameServerInfoMSRequest, GetPrivateGameServerInfoMSResponse)
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user