Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Created January 10, 2014 17:54
Show Gist options
  • Save Akkiesoft/8359169 to your computer and use it in GitHub Desktop.
Save Akkiesoft/8359169 to your computer and use it in GitHub Desktop.
Googleカレンダーの取得する奴
require "rubygems"
require "gcalapi"
require 'time'
mail = ""
pass = ""
feed = ""
srv = GoogleCalendar::Service.new(mail, pass)
cal = GoogleCalendar::Calendar::new(srv, feed)
events = cal.events(:orderby => "starttime")
events.each do |event|
date = event.st.localtime.strftime("%Y%m%d")
time = event.st.localtime.strftime("%H:%M")
p "#{time}: #{event.title}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment