mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into news
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Overlays.Rankings;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
@ -9,11 +10,13 @@ namespace osu.Game.Online.API.Requests
|
||||
public class GetSpotlightRankingsRequest : GetRankingsRequest<GetSpotlightRankingsResponse>
|
||||
{
|
||||
private readonly int spotlight;
|
||||
private readonly RankingsSortCriteria sort;
|
||||
|
||||
public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight)
|
||||
public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight, RankingsSortCriteria sort)
|
||||
: base(ruleset, 1)
|
||||
{
|
||||
this.spotlight = spotlight;
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
@ -21,6 +24,7 @@ namespace osu.Game.Online.API.Requests
|
||||
var req = base.CreateWebRequest();
|
||||
|
||||
req.AddParameter("spotlight", spotlight.ToString());
|
||||
req.AddParameter("filter", sort.ToString().ToLower());
|
||||
|
||||
return req;
|
||||
}
|
||||
|
@ -4,19 +4,16 @@
|
||||
using System.Net.Http;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class JoinChannelRequest : APIRequest
|
||||
{
|
||||
private readonly Channel channel;
|
||||
private readonly User user;
|
||||
|
||||
public JoinChannelRequest(Channel channel, User user)
|
||||
public JoinChannelRequest(Channel channel)
|
||||
{
|
||||
this.channel = channel;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
|
||||
return req;
|
||||
}
|
||||
|
||||
protected override string Target => $@"chat/channels/{channel.Id}/users/{user.Id}";
|
||||
protected override string Target => $@"chat/channels/{channel.Id}/users/{User.Id}";
|
||||
}
|
||||
}
|
||||
|
@ -4,19 +4,16 @@
|
||||
using System.Net.Http;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class JoinRoomRequest : APIRequest
|
||||
{
|
||||
private readonly Room room;
|
||||
private readonly User user;
|
||||
|
||||
public JoinRoomRequest(Room room, User user)
|
||||
public JoinRoomRequest(Room room)
|
||||
{
|
||||
this.room = room;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
|
||||
return req;
|
||||
}
|
||||
|
||||
protected override string Target => $"rooms/{room.RoomID.Value}/users/{user.Id}";
|
||||
protected override string Target => $"rooms/{room.RoomID.Value}/users/{User.Id}";
|
||||
}
|
||||
}
|
||||
|
@ -4,19 +4,16 @@
|
||||
using System.Net.Http;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class LeaveChannelRequest : APIRequest
|
||||
{
|
||||
private readonly Channel channel;
|
||||
private readonly User user;
|
||||
|
||||
public LeaveChannelRequest(Channel channel, User user)
|
||||
public LeaveChannelRequest(Channel channel)
|
||||
{
|
||||
this.channel = channel;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
|
||||
return req;
|
||||
}
|
||||
|
||||
protected override string Target => $@"chat/channels/{channel.Id}/users/{user.Id}";
|
||||
protected override string Target => $@"chat/channels/{channel.Id}/users/{User.Id}";
|
||||
}
|
||||
}
|
||||
|
@ -4,19 +4,16 @@
|
||||
using System.Net.Http;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class PartRoomRequest : APIRequest
|
||||
{
|
||||
private readonly Room room;
|
||||
private readonly User user;
|
||||
|
||||
public PartRoomRequest(Room room, User user)
|
||||
public PartRoomRequest(Room room)
|
||||
{
|
||||
this.room = room;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
|
||||
return req;
|
||||
}
|
||||
|
||||
protected override string Target => $"rooms/{room.RoomID.Value}/users/{user.Id}";
|
||||
protected override string Target => $"rooms/{room.RoomID.Value}/users/{User.Id}";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user