Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.dirname(__FILE__) + '/base'
- module Upcoming
- class Event < Base
- base_uri 'upcoming.yahooapis.com'
- def initialize(params)
- @params = params['rsp'].nil? ? params : params['rsp']['event']
- end
- def self.find(id)
- params = get('/services/rest/', :query => {:method => 'event.getInfo', :event_id => id})
- self.new(params)
- end
- def method_missing(method_name, *args)
- @params[method_name.to_s] if @params.has_key?(method_name.to_s)
- end
- end
- end
Add Comment
Please, Sign In to add comment