Skip to content

Instantly share code, notes, and snippets.

Created Sep 27, 2012
What would you like to do?
Sample onthesides job
# Fetch a list of words to search
# for on Twitter, and return the
# last ~10 people who used each.
# There's a bunch of libraries you
# can use. E.g. typhoeus for HTTP.
url = ""
watch = Typhoeus::Request.get url
# YAML, JSON, Nokogiri for XML, Base64...
list = YAML.load(watch.body).map do |word|
res = { search: word, results: [] }
# Various 3rd party APIs, like Twitter,
# Facebook, GitHub, Foursquare...
count: 10,
result_type: "recent"
) do |status|
res[:results].push status.from_user
# on the sides also has an API, which
# you can use for logging data, or
# even creating new jobs from within!
Sides.log list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment