1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 06:22:55 +08:00
osu-lazer/osu.Game/Online/API/APIMessagesRequest.cs

29 lines
756 B
C#
Raw Normal View History

2018-04-14 19:32:48 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
namespace osu.Game.Online.API
{
public abstract class APIMessagesRequest : APIRequest<List<Message>>
{
2018-05-07 01:54:41 +08:00
private readonly long? sinceId;
2018-04-14 19:32:48 +08:00
protected APIMessagesRequest(long? sinceId)
{
this.sinceId = sinceId;
}
protected override WebRequest CreateWebRequest()
{
var req = base.CreateWebRequest();
if (sinceId.HasValue) req.AddParameter(@"since", sinceId.Value.ToString());
return req;
}
}
}