northworld / google_calendar

A minimal wrapper around the Google Calendar API
http://northworld.github.io/google_calendar
MIT License
315 stars 133 forks source link

All Day Event for Specific Calendar #31

Closed bstephenf closed 10 years ago

bstephenf commented 10 years ago

Right now, I have ... puts cal.events ... working for showing a list of the events on my calendar.

How do I show the details for all-day events for a particular calendar? - Can you show an example of how to do that?

projectdelphai commented 10 years ago

Read the comments at the beginning of the calendar.rb file. According to those, you should be able to do it by specifying the calendar name along with your username and password. So:

cal = Google::Calendar.new(:username => 'username', :password => 'password', :calendar => 'calendar_2')
bstephenf commented 10 years ago

Thank you, it worked!

bstephenf commented 10 years ago

Follow-up Question: Is there a way to return only the event name?

Current Output: Dave Production (gur76h4bm7faaukt9ndrnu5n8s) 2014-05-30 2014-05-31

Desired Output: Dave Production

bstephenf commented 10 years ago

Oh - sorry (I'm new to this but learning fast). Got it working using this: rotation_dataops = cal_do_rotation.find_events_in_range(Time.now-1, Time.now).title.to_s

projectdelphai commented 10 years ago

No problem. Don't forget to close this issue if you have no other questions.