Skip to content

Instantly share code, notes, and snippets.

@johnnygoodman
Created March 18, 2013 15:50
Show Gist options
  • Save johnnygoodman/5188175 to your computer and use it in GitHub Desktop.
Save johnnygoodman/5188175 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'google_calendar'
require 'awesome_print'
require 'date'
require 'time'
cal = Google::Calendar.new(:username => 'my@gmail.com',
:password => 'awesome_password_of_lore',
:app_name => 'CDS Calendar')
#
#
event = cal.create_event do |e|
e.title = 'An All Day Cool Event'
e.all_day = Time.parse('2012-09-25')
end
# e.start_time = Time.now
# e.end_time = Time.now + (60 * 60) # seconds * min
# end
#
# puts event
#
#
#
#
# p cal.events.first
#
#
# cal.events.first.end_time.to_s.match(/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/)
#
# puts "$1: #{$1} $2: #{$2}"
#
# # Query events
# #puts cal.find_events('Ruby')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment