def alerting_media(opts = {})
        time = opts[:time] || Time.now
        severity = opts[:severity] || self.condition

        # return empty set if disabled, or in a maintenance period (for API only,
        # these will have been checked already in processor if called by notifier)
        if opts.empty?
          unless self.enabled
            return Flapjack::Data::Medium.empty
          end

          unless self.current_unscheduled_maintenance.nil?
            return Flapjack::Data::Medium.empty
          end

          start_range = Zermelo::Filters::IndexRange.new(nil, time, :by_score => true)
          end_range   = Zermelo::Filters::IndexRange.new(time, nil, :by_score => true)

          unless self.scheduled_maintenances.
            intersect(:start_time => start_range, :end_time => end_range).empty?

            return Flapjack::Data::Medium.empty
          end
        end

        # determine matching acceptors
        tag_ids = self.tags.ids

        acceptor_ids = matching_rule_ids(tag_ids, :blackhole => false, :severity => severity)
        acceptor_media_ids = Flapjack::Data::Rule.matching_media_ids(acceptor_ids,
          :time => time)

        return Flapjack::Data::Medium.empty if acceptor_media_ids.empty?

        # and matching rejectors
        rejector_ids = matching_rule_ids(tag_ids, :blackhole => true, :severity => severity)
        rejector_media_ids = Flapjack::Data::Rule.matching_media_ids(rejector_ids,
          :time => time)

        unless rejector_media_ids.empty?
          acceptor_media_ids -= rejector_media_ids
          return Flapjack::Data::Medium.empty if acceptor_media_ids.empty?
        end

        Flapjack::Data::Medium.intersect(:id => acceptor_media_ids)
      end
this can be called from the API (with no args) or from notifier.rb
(which will pass a severity to use, and an effective time)