コード例 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="altText">
 /// Alternative text.
 /// Max: 400 characters
 ///</param>
 /// <param name="template">
 /// A Buttons, Confirm, Carousel, or Image Carousel object.
 /// </param>
 /// <param name="quickReply">
 /// QuickRepy
 /// </param>
 /// <param name="sender">
 /// Sender
 /// </param>
 public TemplateMessage(string altText, ITemplate template, QuickReply quickReply = null, Sender sender = null)
 {
     AltText    = altText.Substring(0, Math.Min(altText.Length, 400));
     Template   = template;
     QuickReply = quickReply;
     Sender     = sender;
 }
コード例 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="title">
 /// Title
 /// Max: 100 characters
 /// </param>
 /// <param name="address">
 /// Address
 /// Max: 100 characters
 /// </param>
 /// <param name="latitude">
 /// Latitude
 /// </param>
 /// <param name="longitude">
 /// Longitude
 /// </param>
 /// <param name="quickReply">
 /// QuickReply
 /// </param>
 /// <param name="sender">
 /// Sender
 /// </param>
 public LocationMessage(string title, string address, decimal latitude, decimal longitude, QuickReply quickReply = null, Sender sender = null)
 {
     Title      = title.Substring(0, Math.Min(title.Length, 100));
     Address    = address.Substring(0, Math.Min(address.Length, 100));
     Latitude   = latitude;
     Longitude  = longitude;
     QuickReply = quickReply;
     Sender     = sender;
 }
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="baseUrl">
 /// Base URL of image (Max: 1000 characters)
 /// HTTPS
 /// </param>
 /// <param name="altText">
 /// Alternative text
 /// Max: 400 characters
 /// </param>
 /// <param name="baseSize">
 /// Width of base image (set to 1040px)
 /// Height of base image(set to the height that corresponds to a width of 1040px)
 /// </param>
 /// <param name="actions">
 /// Action when tapped.
 /// Max: 50
 /// </param>
 /// <param name="quickReply">
 /// QuickReply
 /// </param>
 /// <param name="video">
 /// Video to play on imagemap
 /// </param>
 /// <param name="sender">
 /// Sender
 /// </param>
 public ImagemapMessage(string baseUrl, string altText, ImageSize baseSize, IList <IImagemapAction> actions, QuickReply quickReply = null, Video video = null, Sender sender = null)
 {
     BaseUrl    = baseUrl;
     AltText    = altText.Substring(0, Math.Min(altText.Length, 400));;
     BaseSize   = baseSize;
     Actions    = actions;
     QuickReply = quickReply;
     Video      = video;
     Sender     = sender;
 }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="text">
 /// Message text
 /// Max: 2000 characters
 /// </param>
 /// <param name="quickReply">
 /// QuickReply
 /// </param>
 /// <param name="sender">
 /// Sender
 /// </param>
 public TextMessage(string text, QuickReply quickReply = null, Sender sender = null)
 {
     Text       = text.Substring(0, Math.Min(text.Length, 2000));
     QuickReply = quickReply;
     Sender     = sender;
 }