mirror of
https://github.com/ppy/osu.git
synced 2026-05-17 15:33:35 +08:00
22 lines
631 B
C#
22 lines
631 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;
|
|
|
|
namespace osu.Game.Online.Rooms
|
|
{
|
|
public static class RoomExtensions
|
|
{
|
|
/// <summary>
|
|
/// Get the room page URL, or <c>null</c> if unavailable.
|
|
/// </summary>
|
|
public static string? GetOnlineURL(this Room room, IAPIProvider api)
|
|
{
|
|
if (!room.RoomID.HasValue)
|
|
return null;
|
|
|
|
return $@"{api.Endpoints.WebsiteUrl}/multiplayer/rooms/{room.RoomID.Value}";
|
|
}
|
|
}
|
|
}
|