mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
35 lines
757 B
C#
35 lines
757 B
C#
|
|
#nullable disable
|
||
|
|
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using Newtonsoft.Json.Serialization;
|
||
|
|
|
||
|
|
namespace West.TelegramBot.ChatQuotes.Model;
|
||
|
|
|
||
|
|
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
|
||
|
|
public class QuoteResponse
|
||
|
|
{
|
||
|
|
public bool Ok { get; set; }
|
||
|
|
|
||
|
|
public Result Result { get; set; }
|
||
|
|
public static QuoteResponse FromJson(string json)
|
||
|
|
=> JsonConvert.DeserializeObject<QuoteResponse>(json, ChatQuotes.SerializerSettings);
|
||
|
|
}
|
||
|
|
|
||
|
|
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
|
||
|
|
public class Result
|
||
|
|
{
|
||
|
|
public string Image { get; set; }
|
||
|
|
|
||
|
|
public QuoteType Type { get; set; }
|
||
|
|
|
||
|
|
public long Width { get; set; }
|
||
|
|
|
||
|
|
public long Height { get; set; }
|
||
|
|
}
|
||
|
|
|
||
|
|
public enum QuoteType
|
||
|
|
{
|
||
|
|
Quote = 0,
|
||
|
|
Image,
|
||
|
|
Null
|
||
|
|
}
|