1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:53:01 +08:00
osu-lazer/osu.Game/Online/API/Requests/GetUserMessagesRequest.cs
2018-04-08 22:12:57 +02:00

31 lines
874 B
C#

// 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.Requests
{
public class GetUserMessagesRequest : APIRequest<List<Message>>
{
private long? since;
public GetUserMessagesRequest(long? sinceId = null)
{
since = sinceId;
}
protected override WebRequest CreateWebRequest()
{
var request = base.CreateWebRequest();
if (since.HasValue)
request.AddParameter(@"since", since.Value.ToString());
return request;
}
protected override string Target => @"chat/messages/private";
}
}