mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
21 lines
490 B
C#
21 lines
490 B
C#
#nullable disable
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace NadekoBot.Modules.Nsfw.Common;
|
|
|
|
public class DerpiContainer
|
|
{
|
|
public DerpiImageObject[] Images { get; set; }
|
|
}
|
|
|
|
public class DerpiImageObject : IImageData
|
|
{
|
|
[JsonPropertyName("view_url")]
|
|
public string ViewUrl { get; set; }
|
|
|
|
public string[] Tags { get; set; }
|
|
public int Score { get; set; }
|
|
|
|
public ImageData ToCachedImageData(Booru type)
|
|
=> new(ViewUrl, type, Tags, Score.ToString("F1"));
|
|
} |