public Result <SendMessageResponse> SendMessage(string message, string fromNumber, List <string> toNumbers)
        {
            var endPoint = new SendMessageEndPoint();

            var result =
                endPoint.Call(message, fromNumber, toNumbers)
                .Mdo(response => Ok(response.messages.Select(m => new SendMessageResponse(m.apiMessageId, m.to, m.accepted)).Single()));

            return(result);
        }
Exemple #2
0
        readonly string _fromNumber = "39360";  // Shortcode used in Clickatell APIs as the fromNumber


        public Result <SendMessageResponse> SendMessage(string message, string toNumber)
        {
            var endPoint = new SendMessageEndPoint();

            var result =
                endPoint.Call(message, _fromNumber, toNumber)
                .Mdo(response => Ok(new SendMessageResponse(response.messageId, toNumber, true)));

            return(result);
        }