mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
21 lines
566 B
C#
21 lines
566 B
C#
#nullable disable
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace NadekoBot.Modules.Nsfw.Common;
|
|
|
|
public class DapiImageObject : IImageData
|
|
{
|
|
[JsonPropertyName("File_Url")]
|
|
public string FileUrl { get; set; }
|
|
|
|
public string Tags { get; set; }
|
|
|
|
[JsonPropertyName("Tag_String")]
|
|
public string TagString { get; set; }
|
|
|
|
public int Score { get; set; }
|
|
public string Rating { get; set; }
|
|
|
|
public ImageData ToCachedImageData(Booru type)
|
|
=> new(FileUrl, type, Tags?.Split(' ') ?? TagString?.Split(' '), Score.ToString() ?? Rating);
|
|
} |