Files
telegram-bot/modules/ChatQuotes/Model/QuoteResponse.cs
T

35 lines
757 B
C#
Raw Normal View History

2022-01-21 00:10:27 +02:00
#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
}