osu/osu.Game/Online/API/Requests/GetWikiRequest.cs

24 lines
701 B
C#
Raw Normal View History

2021-04-20 09:40:30 +00: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 06:57:13 +00:00
using osu.Game.Extensions;
using osu.Game.Localisation;
2021-04-20 09:40:30 +00: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 06:57:13 +00:00
private readonly Language language;
2021-04-20 09:40:30 +00:00
2022-03-04 06:57:13 +00:00
public GetWikiRequest(string path, Language language = Language.en)
2021-04-20 09:40:30 +00:00
{
this.path = path;
2022-03-04 06:57:13 +00:00
this.language = language;
2021-04-20 09:40:30 +00:00
}
2022-03-04 06:57:13 +00:00
protected override string Target => $"wiki/{language.ToCultureCode()}/{path}";
2021-04-20 09:40:30 +00:00
}
}