splits typed response into response without result and response with result

This commit is contained in:
Philipp Häfelfinger 2022-10-16 23:10:20 +02:00
parent 37c262e74f
commit 181ccef825

View File

@ -2,7 +2,7 @@ using Newtonsoft.Json;
namespace Piwigo.Client.Contract;
internal class PiwigoResponse<T>
internal class PiwigoResponse
{
[JsonProperty("stat")]
public string? Status { get; init; }
@ -12,7 +12,10 @@ internal class PiwigoResponse<T>
[JsonProperty("message")]
public string? Message { get; init; }
}
internal class PiwigoResponse<T> : PiwigoResponse
{
[JsonProperty("result")]
public T Result { get; init; } = default!;
}