Skip to content

Instantly share code, notes, and snippets.

@miyucy
Created June 15, 2009 03:19
Show Gist options
  • Save miyucy/129925 to your computer and use it in GitHub Desktop.
Save miyucy/129925 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby -wKU -rubygems
gem 'pauldix-typhoeus'
require 'typhoeus'
require 'rss'
require 'pp'
class Atnd
include Typhoeus
remote_defaults :on_success => lambda { |res| RSS::Parser.parse res.body, false },
:on_failure => lambda { |res| nil },
:base_uri => 'http://atnd.org'
define_remote_method :events, :path => '/events.rss'
end
Atnd.events.channel.items.each do |item|
p item.title
end rescue nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment