Skip to content
lukes edited this page May 5, 2011 · 5 revisions

Usage

First step is to require Herald into your Ruby project

require 'rubygems'
require 'herald'

Anatomy of a Herald request

Herald is configured by taking parameters inside a Ruby block

Herald.watch do
  # options go here ...
end

Essential configuration parameters are check (define one of the sources to watch), and _for (define some keywords to look out for)

Herald.watch do
  check :twitter
  _for "soundofmusic"
end

By default, this setup will print what it finds to Ruby's stdout (usually your command terminal if you're running Herald from it).

To choose another action to perform when the herald finds some items that match the keywords in your source, add in an action.

Herald.watch do
  check :twitter
  _for "soundofmusic"
  action :growl
end

See

Clone this wiki locally