Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 /// <param name="quickReplies"></param>
 /// <returns>
 ///
 /// </returns>
 public async Task <BroadcastMessageResult> CreateBroadcastMessageAsunc(string text, List <QuickReply> quickReplies)
 {
     try
     {
         return(await broadcastClient.CreateMessageAsunc(text, quickReplies));
     }
     catch (Exception e)
     {
         Logger.LogError(e, e.Message);
         return(BaseResult.CreateFailed <BroadcastMessageResult>());
     }
 }
        public void CreateMessageWithQuickReplyTest()
        {
            List <QuickReply> qrl = new List <QuickReply>();

            qrl.Add(new QuickReply()
            {
                Title          = "title 1",
                Payload        = "postback#1",
                QuickReplyType = QuickReplyTypes.Text
            });

            qrl.Add(new QuickReply()
            {
                Title          = "title 2",
                Payload        = "postback#2",
                QuickReplyType = QuickReplyTypes.Text
            });

            var result = client.CreateMessageAsunc("Broadcast message with quick replies", qrl).Result;

            Trace.WriteLine($"Message Id: {result.Id}");
        }