Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            var notification = new ProwlNotification();
            var options      = new CommandOptions();

            if (CommandLine.Parser.Default.ParseArguments(args, options))
            {
                notification.ApiKey      = options.ApiKey;
                notification.Application = options.Application;
                notification.Event       = options.Event;
                notification.Description = options.Description;
                notification.Priority    = options.Priority;
            }

            var client = new ProwlClient();

            try
            {
                client.SendNotification(notification);
                Console.WriteLine("Notification successfully sent.");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("*** PROWL API TEST ***");

            var notification = new ProwlNotification()
            {
                ApiKey      = "75fcd3a230ac062616e14c15ed5f79bdb5d0d199",
                Application = "Send To Prowl",
                Event       = "Test Notification",
                Description = "Just testing notifications",
                Priority    = 1
            };

            var client = new ProwlClient();

            client.SendNotification(notification);
        }