2021-04-20 17:40:30 +08:00
|
|
|
// 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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2022-03-04 14:57:13 +08:00
|
|
|
using osu.Game.Extensions;
|
|
|
|
using osu.Game.Localisation;
|
2021-04-20 17:40:30 +08:00
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
{
|
|
|
|
public class GetWikiRequest : APIRequest<APIWikiPage>
|
|
|
|
{
|
2022-07-20 13:47:20 +08:00
|
|
|
public readonly string Path;
|
|
|
|
|
2022-03-04 14:57:13 +08:00
|
|
|
private readonly Language language;
|
2021-04-20 17:40:30 +08:00
|
|
|
|
2022-03-04 14:57:13 +08:00
|
|
|
public GetWikiRequest(string path, Language language = Language.en)
|
2021-04-20 17:40:30 +08:00
|
|
|
{
|
2022-07-20 13:47:20 +08:00
|
|
|
Path = path;
|
2022-03-04 14:57:13 +08:00
|
|
|
this.language = language;
|
2021-04-20 17:40:30 +08:00
|
|
|
}
|
|
|
|
|
2022-07-20 13:47:20 +08:00
|
|
|
protected override string Target => $"wiki/{language.ToCultureCode()}/{Path}";
|
2021-04-20 17:40:30 +08:00
|
|
|
}
|
|
|
|
}
|