mirror of
https://github.com/ppy/osu.git
synced 2024-11-16 05:37:24 +08:00
7b47215657
Them being together always bothered me and led to the abject failure that is `APIUser` and its sprawl. Now that I'm about to add a flag that is unique to `/me` for verification purposes, I'm not repeating the errors of the past by adding yet another flag to `APIUser` that is never present outside of a single usage context.
25 lines
732 B
C#
25 lines
732 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
using osu.Game.Rulesets;
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
{
|
|
public class GetMeRequest : APIRequest<APIMe>
|
|
{
|
|
public readonly IRulesetInfo? Ruleset;
|
|
|
|
/// <summary>
|
|
/// Gets the currently logged-in user.
|
|
/// </summary>
|
|
/// <param name="ruleset">The ruleset to get the user's info for.</param>
|
|
public GetMeRequest(IRulesetInfo? ruleset = null)
|
|
{
|
|
Ruleset = ruleset;
|
|
}
|
|
|
|
protected override string Target => $@"me/{Ruleset?.ShortName}";
|
|
}
|
|
}
|