mirror of
https://github.com/JuniorDark/RustyHearts-Launcher.git
synced 2026-05-07 05:21:44 -04:00
Changes for RustyHearts-API 1.3.0
This commit is contained in:
parent
558761943e
commit
1692923e18
14 changed files with 500 additions and 226 deletions
|
|
@ -10,20 +10,20 @@ public class Configuration
|
|||
|
||||
public Configuration()
|
||||
{
|
||||
string apiUrl = iniFile.ReadValue("Info", "LoginURL");
|
||||
string apiUrl = iniFile.ReadValue("Info", "ServerURL");
|
||||
|
||||
//Client endpoints
|
||||
GateXMLUrl = $"{apiUrl}/serverApi/gateway";
|
||||
GateInfoUrl = $"{apiUrl}/serverApi/gateway/info";
|
||||
GateStatusUrl = $"{apiUrl}/serverApi/gateway/status";
|
||||
GateXMLUrl = $"{apiUrl}/launcher/GetGatewayAction";
|
||||
GateInfoUrl = $"{apiUrl}/launcher/GetGatewayAction/info";
|
||||
GateStatusUrl = $"{apiUrl}/launcher/GetGatewayAction/status";
|
||||
|
||||
//Launcher endpoints
|
||||
LoginUrl = $"{apiUrl}/accountApi/login";
|
||||
RegisterUrl = $"{apiUrl}/accountApi/register";
|
||||
SendCodeUrl = $"{apiUrl}/accountApi/sendVerificationEmail";
|
||||
VerifyCodeUrl = $"{apiUrl}/accountApi/codeVerification";
|
||||
SendPasswordCodeUrl = $"{apiUrl}/accountApi/sendPasswordResetEmail";
|
||||
ChangePasswordUrl = $"{apiUrl}/accountApi/changePassword";
|
||||
LoginUrl = $"{apiUrl}/launcher/LoginAction";
|
||||
RegisterUrl = $"{apiUrl}/launcher/SignupAction";
|
||||
SendCodeUrl = $"{apiUrl}/launcher/SendVerificationEmailAction";
|
||||
VerifyCodeUrl = $"{apiUrl}/launcher/VerifyCodeAction";
|
||||
SendPasswordCodeUrl = $"{apiUrl}/launcher/SendPasswordResetEmailAction";
|
||||
ChangePasswordUrl = $"{apiUrl}/launcher/ResetPasswordAction";
|
||||
LauncherNewsUrl = $"{apiUrl}/launcher/news";
|
||||
AgreementUrl = $"{apiUrl}/launcher/agreement";
|
||||
|
||||
|
|
@ -36,12 +36,12 @@ public class Configuration
|
|||
DownloadUpdateFileUrl = $"{apiUrl}/launcher/patch";
|
||||
|
||||
//Launcher update endpoints
|
||||
GetLauncherVersion = $"{apiUrl}/launcherApi/launcherUpdater/getLauncherVersion";
|
||||
UpdateLauncherVersion = $"{apiUrl}/launcherApi/launcherUpdater/updateLauncherVersion";
|
||||
GetLauncherVersion = $"{apiUrl}/launcherAction/getLauncherVersion";
|
||||
UpdateLauncherVersion = $"{apiUrl}/launcherAction/updateLauncherVersion";
|
||||
|
||||
//Launcher settings
|
||||
string lang = iniFile.ReadValue("Launcher", "Lang");
|
||||
Lang = lang;
|
||||
Lang = iniFile.ReadValue("Launcher", "Lang");
|
||||
Service = iniFile.ReadValue("Info", "Service");
|
||||
}
|
||||
|
||||
public string GateXMLUrl { get; set; }
|
||||
|
|
@ -62,5 +62,6 @@ public class Configuration
|
|||
public string ClientPartsListUrl { get; set; }
|
||||
public string DownloadClientPartUrl { get; set; }
|
||||
public string Lang { get; set; }
|
||||
public string Service { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
36
RHLauncher.Helper/HttpResponse.cs
Normal file
36
RHLauncher.Helper/HttpResponse.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace RHLauncher.RHLauncher.Helper;
|
||||
|
||||
public class HttpResponse
|
||||
{
|
||||
[JsonProperty("success")]
|
||||
public string? Success { get; set; }
|
||||
|
||||
[JsonProperty("result")]
|
||||
public string? Result { get; set; }
|
||||
|
||||
[JsonProperty("message")]
|
||||
public string? Message { get; set; }
|
||||
}
|
||||
|
||||
public class LoginResponse
|
||||
{
|
||||
[JsonProperty("result")]
|
||||
public string? Result { get; set; }
|
||||
|
||||
[JsonProperty("token")]
|
||||
public string? Token { get; set; }
|
||||
|
||||
[JsonProperty("windyCode")]
|
||||
public string? WindyCode { get; set; }
|
||||
|
||||
[JsonProperty("message")]
|
||||
public string? Message { get; set; }
|
||||
}
|
||||
|
||||
public class ServerStatusResponse
|
||||
{
|
||||
[JsonProperty("status")]
|
||||
public string? Status { get; set; }
|
||||
}
|
||||
|
|
@ -21,9 +21,9 @@ namespace RHLauncher.RHLauncher.Helper
|
|||
if (!File.Exists(_iniFilePath))
|
||||
{
|
||||
//Default api url
|
||||
WritePrivateProfileString("Info", "LoginURL", "http://localhost:3000", _iniFilePath);
|
||||
WritePrivateProfileString("Info", "ServerURL", "http://127.0.0.1", _iniFilePath);
|
||||
//Default client service
|
||||
WritePrivateProfileString("Info", "Service", "usa", _iniFilePath);
|
||||
WritePrivateProfileString("Info", "Service", "jpn", _iniFilePath);
|
||||
//Default launcher language
|
||||
WritePrivateProfileString("Launcher", "Lang", "en", _iniFilePath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue