class Google::CalendarListEntry

Represents a Google Calendar List Entry

See developers.google.com/google-apps/calendar/v3/reference/calendarList#resource

Attributes

Attributes

access_role[R]
connection[R]
id[R]
primary[R]
primary?[R]
summary[R]
time_zone[R]

Public Class Methods

build_from_google_feed(response, connection) click to toggle source
# File lib/google/calendar_list_entry.rb, line 33
def self.build_from_google_feed(response, connection)
  items = response['items']
  items.collect { |item| CalendarListEntry.new(item, connection) }
end
new(params, connection) click to toggle source
# File lib/google/calendar_list_entry.rb, line 20
def initialize(params, connection)
  @id = params['id']
  @summary = params['summary']
  @time_zone = params['timeZone']
  @access_role = params['accessRole']
  @primary = params.fetch('primary', false)
  @connection = connection
end

Public Instance Methods

to_calendar() click to toggle source
# File lib/google/calendar_list_entry.rb, line 29
def to_calendar
  Calendar.new({:calendar => @id}, @connection)
end