[quote] Crappy chat quote implementation.

This commit is contained in:
West14
2022-01-21 00:10:27 +02:00
parent d9d5221280
commit 7cd1a295bb
10 changed files with 331 additions and 10 deletions
+35
View File
@@ -0,0 +1,35 @@
#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
}