Messenger template message.
This commit is contained in:
parent
b68c311acb
commit
7d8226cad7
|
|
@ -0,0 +1,5 @@
|
|||
namespace BotSharp.Plugin.MetaMessenger.Interfaces;
|
||||
|
||||
public interface IResponseMessage
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
||||
|
||||
public class AttachementPayload
|
||||
{
|
||||
[JsonPropertyName("template_type")]
|
||||
public string TemplateType { get; set; }
|
||||
public string Text { get; set; }
|
||||
public ButtonItem[] Buttons { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
||||
|
||||
public class AttachmentBody
|
||||
{
|
||||
public string Type { get; set; } = "template";
|
||||
public AttachementPayload Payload { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
||||
|
||||
public class ButtonItem
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
using BotSharp.Plugin.MetaMessenger.Interfaces;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
||||
|
|
@ -6,7 +7,7 @@ namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
|||
/// Quick Replies
|
||||
/// https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies
|
||||
/// </summary>
|
||||
public class QuickReplyMessage
|
||||
public class QuickReplyMessage : IResponseMessage
|
||||
{
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
using BotSharp.Plugin.MetaMessenger.Interfaces;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BotSharp.Plugin.MetaMessenger.MessagingModels;
|
||||
|
||||
/// <summary>
|
||||
/// https://developers.facebook.com/docs/messenger-platform/send-messages/templates
|
||||
/// </summary>
|
||||
public class TemplateMessage : IResponseMessage
|
||||
{
|
||||
[JsonPropertyName("attachment")]
|
||||
public AttachmentBody Attachment { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue