def notify(event, message, *args)
      api_key = args.first.is_a?(String) || args.first.is_a?(Array) ? args.shift : self.api_key

      raise ConfigurationError, "You must provide an API key to send notifications" if api_key.nil?
      raise ConfigurationError, "You must provide an application name to send notifications" if application.nil?

      if args.first.is_a?(Fixnum)
        options = { :priority => args.shift, :delayed => args.shift || Prowler.delayed }
      else
        options = args.last.is_a?(Hash) ? args.pop : {}
        options = { :priority => Prowler::Priority::NORMAL, :delayed => Prowler.delayed }.merge(options)
      end

      options.merge!(
        :application => application, :providerkey => provider_key,
        :apikey => api_key, :event => event, :description => message
      )

      if options.delete(:delayed)
        enqueue_delayed_job(options)
      else
        perform(:add, options, :post, Success)
      end
    end
def notify(event, message, *args)
      api_key = args.first.is_a?(String) || args.first.is_a?(Array) ? args.shift : self.api_key

      raise ConfigurationError, "You must provide an API key to send notifications" if api_key.nil?
      raise ConfigurationError, "You must provide an application name to send notifications" if application.nil?

      if args.first.is_a?(Fixnum)
        options = { :priority => args.shift, :delayed => args.shift || Prowler.delayed }
      else
        options = args.last.is_a?(Hash) ? args.pop : {}
        options = { :priority => Prowler::Priority::NORMAL, :delayed => Prowler.delayed }.merge(options)
      end

      options.merge!(
        :application => application, :providerkey => provider_key,
        :apikey => api_key, :event => event, :description => message
      )

      if options.delete(:delayed)
        enqueue_delayed_job(options)
      else
        perform(:add, options, :post, Success)
      end
    end
:nodoc:
 Create an instance for sending to different accounts within a single Rails application
 Pass any of the following options to override the global configuration:
 * :application:  The name of your application.
 * :provider_key: Key to override the rate limit of 1000 requests per hour.
 * :api_key:      Your API key.
 * :service_url:  Override the configured service url
 Send a notification to your iPhone:
 * event:   The title of notification you want to send.
 * message: The text of the notification message you want to send.
 * api_key: One or more API keys to be notified - uses the configured key(s) if not provided.

 The following options are supported:
 * :delayed:  Whether to use Delayed::Job to send notifications.
 * :priority: The priority of the notification - see Prowler::Priority.
 * :url:      A custom url for the Prowl application to open.