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-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>
|
|
|
|
{
|
|
|
|
private 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
|
|
|
{
|
|
|
|
this.path = path;
|
2022-03-04 14:57:13 +08:00
|
|
|
this.language = language;
|
2021-04-20 17:40:30 +08:00
|
|
|
}
|
|
|
|
|
2022-03-04 14:57:13 +08:00
|
|
|
protected override string Target => $"wiki/{language.ToCultureCode()}/{path}";
|
2021-04-20 17:40:30 +08:00
|
|
|
}
|
|
|
|
}
|