static void Main(string[] args) { Contact owner = new Contact("grupo3"); Phonebook phonebook = new Phonebook(owner); Contact nacho = phonebook.AddContact("nacho"); nacho.TwitterId = "1203382413524688896"; nacho.Phone = "+59891026239"; Contact jero = phonebook.AddContact("jero"); jero.Phone = "+59899382129"; Contact rodri = phonebook.AddContact("rodri"); rodri.Phone = "+59895032980"; IMessageChannel channel = new TwitterChannel(); //channel = new WhatsappChannel(); phonebook.SendMessage(new string[1] { "nacho" }, "Prueba twitter", channel); }
static void Main(string[] args) { // Crear el contacto dueƱo Contact contact = new Contact("Test"); // Crear la lista de contactos Phonebook phonebook = new Phonebook(contact); // Agregar contactos a la lista phonebook.AddContact("Gms", null, "+11111111111"); // Enviar un correo a algunos contactos // Enviar un WhatsApp a algunos contactos Message wppMsg = new Message("Gms", "+11111111111"); wppMsg.Text = "Mensaje de prueba2"; const string accountSid = ""; const string authToken = ""; IMessageChannel wppChannel = new WhatsAppMessageChanel(accountSid, authToken); phonebook.SendMessage(wppChannel, wppMsg, new string[] { "Gms" }); // Enviar un mensaje por Twitter a algunos contactos string consumerKey = ""; string consumerKeySecret = ""; string accessToken = ""; string accessTokenSecret = ""; TwitterChannel twitter = new TwitterChannel(consumerKey, consumerKeySecret, accessToken, accessTokenSecret); phonebook.AddContact("Gio", "809185528457338880"); Message twittermessage = new Message("PooUcu", "809185528457338880"); twittermessage.Text = "Hola! Todo bien?"; phonebook.SendMessage(twitter, twittermessage, new string[] { "Gio" }); }