0.0
No release in over 3 years
Low commit activity in last 3 years
Parse GoogleCalenders into iCalendar objects from ID or public iCal URL
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 0.12
~> 12.3
~> 3.0
~> 0.16

Runtime

~> 2.5
~> 2.0
 Project Readme

Google iCalendar

gem rspec coverage maintainability

Google Calendar extension for iCalendar

Installation

Add this line to your application's Gemfile:

gem 'icalendar-google'

And then execute:

bundle

Or install it yourself as:

gem install icalendar-google

Usage

require "icalendar/google"

google_id  = "ht3jlfaac5lfd6263ulfh4tql8@group.calendar.google.com"
public_url = "https://calendar.google.com/calendar/ical/#{CGI.escape google_id}/public/basic.ics"

gcal = Icalendar::Calendar.from_google_id(google_id).first
# or
gcal = Icalendar::Calendar.from_url(public_url).first

gcal.google_id
# => "ht3jlfaac5lfd6263ulfh4tql8@group.calendar.google.com"

gcal.webcal_url
# => "webcal://calendar.google.com/calendar/ical/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic.ics"

gcal.event_url(gcal.events.last)
# => "https://calendar.google.com/calendar/event?eid=bW9vbnBoYXNlKzE1MTY4MzI0MDAwMDAgaHQzamxmYWFjNWxmZDYyNjN1bGZoNHRxbDhAZw"

Contributing

Bug reports and pull requests are welcome on GitHub at amancevice/icalendar-google.

License

The gem is available as open source under the terms of the MIT License.