1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 22:33:21 +08:00
osu-lazer/osu.Game/Online/API/Requests/GetRoomsRequest.cs

48 lines
1.3 KiB
C#
Raw Normal View History

// 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 System.Collections.Generic;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Online.API.Requests
{
public class GetRoomsRequest : APIRequest<List<Room>>
{
private readonly PrimaryFilter primaryFilter;
public GetRoomsRequest(PrimaryFilter primaryFilter)
{
this.primaryFilter = primaryFilter;
}
protected override string Target
{
get
{
string target = "rooms";
switch (primaryFilter)
{
case PrimaryFilter.Open:
break;
2019-04-01 11:44:46 +08:00
case PrimaryFilter.Owned:
target += "/owned";
break;
2019-04-01 11:44:46 +08:00
case PrimaryFilter.Participated:
target += "/participated";
break;
2019-04-01 11:44:46 +08:00
case PrimaryFilter.RecentlyEnded:
target += "/ended";
break;
}
return target;
}
}
}
}