2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-14 11:32:48 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2018-04-14 11:32:48 +00:00
|
|
|
|
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-06 17:54:41 +00:00
|
|
|
|
private readonly long? sinceId;
|
2018-04-14 11:32:48 +00: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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|