mirror of
https://github.com/osukey/osukey.git
synced 2025-06-14 07:47:59 +09:00
make user lookup string public
This commit is contained in:
parent
c166f1a06a
commit
1b264a2dd0
@ -8,7 +8,7 @@ namespace osu.Game.Online.API.Requests
|
|||||||
{
|
{
|
||||||
public class GetUserRequest : APIRequest<User>
|
public class GetUserRequest : APIRequest<User>
|
||||||
{
|
{
|
||||||
private readonly string lookup;
|
public readonly string Lookup;
|
||||||
public readonly RulesetInfo Ruleset;
|
public readonly RulesetInfo Ruleset;
|
||||||
private readonly LookupType lookupType;
|
private readonly LookupType lookupType;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ namespace osu.Game.Online.API.Requests
|
|||||||
/// <param name="ruleset">The ruleset to get the user's info for.</param>
|
/// <param name="ruleset">The ruleset to get the user's info for.</param>
|
||||||
public GetUserRequest(long? userId = null, RulesetInfo ruleset = null)
|
public GetUserRequest(long? userId = null, RulesetInfo ruleset = null)
|
||||||
{
|
{
|
||||||
lookup = userId.ToString();
|
Lookup = userId.ToString();
|
||||||
lookupType = LookupType.Id;
|
lookupType = LookupType.Id;
|
||||||
Ruleset = ruleset;
|
Ruleset = ruleset;
|
||||||
}
|
}
|
||||||
@ -38,12 +38,12 @@ namespace osu.Game.Online.API.Requests
|
|||||||
/// <param name="ruleset">The ruleset to get the user's info for.</param>
|
/// <param name="ruleset">The ruleset to get the user's info for.</param>
|
||||||
public GetUserRequest(string username = null, RulesetInfo ruleset = null)
|
public GetUserRequest(string username = null, RulesetInfo ruleset = null)
|
||||||
{
|
{
|
||||||
lookup = username;
|
Lookup = username;
|
||||||
lookupType = LookupType.Username;
|
lookupType = LookupType.Username;
|
||||||
Ruleset = ruleset;
|
Ruleset = ruleset;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string Target => lookup != null ? $@"users/{lookup}/{Ruleset?.ShortName}?key={lookupType.ToString().ToLower()}" : $@"me/{Ruleset?.ShortName}";
|
protected override string Target => Lookup != null ? $@"users/{Lookup}/{Ruleset?.ShortName}?key={lookupType.ToString().ToLower()}" : $@"me/{Ruleset?.ShortName}";
|
||||||
|
|
||||||
private enum LookupType
|
private enum LookupType
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user