Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Contact owner = new Contact("wppUcu", "+14155238886", "");
            // Crear el contacto dueño

            Phonebook book = new Phonebook(owner);

            // Crear la lista de contactos

            book.Add("paolo", "+59892370344", "1174842747842416640");
            book.Add("santiago", "+59898437684", "");
            book.Add("seba", "+59898396922", "1175133180854243328");
            // Agregar contactos a la lista

            // Enviar un correo a algunos contactos

            List <Contact> ContactsBook = book.Search(new string [] { "paolo" });

            foreach (Contact contacts in ContactsBook)
            {
                book.SendWPPMessage(contacts, "hola bro");
                book.SendTwitterMessage(contacts, "hola bro");
            }
            // Enviar un WhatsApp a algunos contactos

            // Enviar un mensaje en Twitter
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Phonebook ContactList = new Phonebook(new Contact("Martin"));

            ContactList.AddNewContact("Test", "+59891611429", "3645352517");

            List <Contact> FoundContacts = ContactList.Search(new string [] { "Test" });

            Console.WriteLine(FoundContacts[0].Name + " " + FoundContacts[0].TwitterID);

            IMessageChannel TwitterChannel = new TwitterChannel();
            IMessageChannel WppChannel     = new WppChannel();

            ContactList.Send(FoundContacts[0], "BLABLA", TwitterChannel);
            ContactList.Send(FoundContacts[0], "Hey there! I'm using WhatsAppUCU", WppChannel);
        }