Merge remote-tracking branch 'origin/master' into Private_Messages

# Conflicts:
#	osu.Game/Online/API/Requests/GetMessagesRequest.cs
#	osu.Game/Overlays/Chat/ChatTabControl.cs
This commit is contained in:
miterosan
2018-05-06 19:45:33 +02:00
94 changed files with 999 additions and 427 deletions

View File

@ -5,13 +5,21 @@ namespace osu.Game.Online.API.Requests
{
public class GetBeatmapSetRequest : APIRequest<APIResponseBeatmapSet>
{
private readonly int beatmapSetId;
private readonly int id;
private readonly BeatmapSetLookupType type;
public GetBeatmapSetRequest(int beatmapSetId)
public GetBeatmapSetRequest(int id, BeatmapSetLookupType type = BeatmapSetLookupType.SetId)
{
this.beatmapSetId = beatmapSetId;
this.id = id;
this.type = type;
}
protected override string Target => $@"beatmapsets/{beatmapSetId}";
protected override string Target => type == BeatmapSetLookupType.SetId ? $@"beatmapsets/{id}" : $@"beatmapsets/lookup?beatmap_id={id}";
}
public enum BeatmapSetLookupType
{
SetId,
BeatmapId,
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Online.API.Requests
{
public class GetUserRequest : APIRequest<User>
{
private long? userId;
private readonly long? userId;
public GetUserRequest(long? userId = null)
{