mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Add website root URL and update most links to use it
For what it's worth, I intentionally didn't include news / changelog / supporter, because these should never change.
This commit is contained in:
@ -28,7 +28,9 @@ namespace osu.Game.Online.API
|
||||
|
||||
private readonly Queue<APIRequest> queue = new Queue<APIRequest>();
|
||||
|
||||
public string Endpoint { get; }
|
||||
public string APIEndpointUrl { get; }
|
||||
|
||||
public string WebsiteRootUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The username/email provided by the user when initiating a login.
|
||||
@ -57,9 +59,10 @@ namespace osu.Game.Online.API
|
||||
{
|
||||
this.config = config;
|
||||
|
||||
Endpoint = endpointConfiguration.APIEndpoint;
|
||||
APIEndpointUrl = endpointConfiguration.APIEndpointUrl;
|
||||
WebsiteRootUrl = endpointConfiguration.WebsiteRootUrl;
|
||||
|
||||
authentication = new OAuth(endpointConfiguration.APIClientID, endpointConfiguration.APIClientSecret, Endpoint);
|
||||
authentication = new OAuth(endpointConfiguration.APIClientID, endpointConfiguration.APIClientSecret, APIEndpointUrl);
|
||||
log = Logger.GetLogger(LoggingTarget.Network);
|
||||
|
||||
ProvidedUsername = config.Get<string>(OsuSetting.Username);
|
||||
@ -245,7 +248,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
var req = new RegistrationRequest
|
||||
{
|
||||
Url = $@"{Endpoint}/users",
|
||||
Url = $@"{APIEndpointUrl}/users",
|
||||
Method = HttpMethod.Post,
|
||||
Username = username,
|
||||
Email = email,
|
||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
protected virtual WebRequest CreateWebRequest() => new OsuWebRequest(Uri);
|
||||
|
||||
protected virtual string Uri => $@"{API.Endpoint}/api/v2/{Target}";
|
||||
protected virtual string Uri => $@"{API.APIEndpointUrl}/api/v2/{Target}";
|
||||
|
||||
protected APIAccess API;
|
||||
protected WebRequest WebRequest;
|
||||
|
@ -28,7 +28,9 @@ namespace osu.Game.Online.API
|
||||
|
||||
public string ProvidedUsername => LocalUser.Value.Username;
|
||||
|
||||
public string Endpoint => "http://localhost";
|
||||
public string APIEndpointUrl => "http://localhost";
|
||||
|
||||
public string WebsiteRootUrl => "http://localhost";
|
||||
|
||||
/// <summary>
|
||||
/// Provide handling logic for an arbitrary API request.
|
||||
|
@ -46,7 +46,12 @@ namespace osu.Game.Online.API
|
||||
/// <summary>
|
||||
/// The URL endpoint for this API. Does not include a trailing slash.
|
||||
/// </summary>
|
||||
string Endpoint { get; }
|
||||
string APIEndpointUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The root URL of of the website, excluding the trailing slash.
|
||||
/// </summary>
|
||||
public string WebsiteRootUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The current connection state of the API.
|
||||
|
Reference in New Issue
Block a user