A search on github led to this gogle , which seems to be a more popular stone (if not standard). It is also better documented and organized.
Here is what I came up with:
require 'google_calendar' cal = Google::Calendar.new(:username => ' username@gmail.com ', :password => 'password', :app_name => 'delete_events') cal.events.each { |event| event.delete if Time.parse(event.start_time) >= Time.new(2011,10,14) }
Time.parse sets the start time of each event in a format that ruby ββcan understand, and then compares it with the specified date on October 14, 2011. If the event is enabled or after the event, it is deleted. To delete events, follow these steps:
if Time.parse(event.start_time) <= Time.new(2011,10,14)
or for all events on a specific date, do:
if Time.parse(event.start_time) == Time.new(2011,10,14)
source share