2013-09-01 20:52:44 +01:00
|
|
|
|
using System.Net.Http;
|
2013-07-30 00:36:55 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using IF.Lastfm.Core.Api.Helpers;
|
|
|
|
|
|
|
|
|
|
namespace IF.Lastfm.Core.Api.Commands.UserApi
|
|
|
|
|
{
|
|
|
|
|
internal class AddShoutCommand : PostAsyncCommandBase<LastResponse>
|
|
|
|
|
{
|
|
|
|
|
public string Recipient { get; set; }
|
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
|
|
|
|
|
public AddShoutCommand(IAuth auth, string recipient, string message) : base(auth)
|
|
|
|
|
{
|
|
|
|
|
Method = "user.shout";
|
|
|
|
|
Recipient = recipient;
|
|
|
|
|
Message = message;
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-01 20:52:44 +01:00
|
|
|
|
public override void SetParameters()
|
2013-07-30 00:36:55 +01:00
|
|
|
|
{
|
2013-09-01 20:52:44 +01:00
|
|
|
|
Parameters.Add("user", Recipient);
|
|
|
|
|
Parameters.Add("message", Message);
|
2013-07-30 00:36:55 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
|
|
|
|
{
|
|
|
|
|
return await LastResponse.HandleResponse(response);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|