Created
October 15, 2018 13:04
-
-
Save icebeam7/da8a27e057953cdd592a97cf9db4b3a5 to your computer and use it in GitHub Desktop.
XamarinWhatsApp: ServicioWhatsAppTwilio.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading.Tasks; | |
using XamarinWhatsApp.Helpers; | |
using XamarinWhatsApp.Modelos; | |
using Twilio; | |
using Twilio.Types; | |
using Twilio.Rest.Api.V2010.Account; | |
namespace XamarinWhatsApp.Servicios | |
{ | |
public static class ServicioWhatsAppTwilio | |
{ | |
public static MessageResource EnviarMensaje(Mensaje mensaje) | |
{ | |
var whatsapp = MessageResource.Create( | |
body: mensaje.Body, | |
from: new PhoneNumber($"whatsapp:{mensaje.From}"), | |
to: new PhoneNumber($"whatsapp:{mensaje.To}") | |
); | |
return whatsapp; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment