google-api-ruby-client
google-api-ruby-client copied to clipboard
Cannot create extendedProperties
Hi there!.
I am using google-apis-calendar_v3. I am trying to add a calendar event with extendedProperties, but it won't work.
event = ::Google::Apis::CalendarV3::Event.new(
summary: "#{booking.booking_type.title},#{booking.name}",
start: ::Google::Apis::CalendarV3::EventDateTime.new(
date_time: booking.start_date.iso8601,
time_zone: 'Europe/Berlin'
),
end: ::Google::Apis::CalendarV3::EventDateTime.new(
date_time: booking.end_date.iso8601,
time_zone: 'Europe/Berlin'
),
recurrence: [
'RRULE:FREQ=DAILY;COUNT=1'
],
extendedProperties: {
private: {
'id': 'id'
}
}
)
result = service.insert_event('primary', event)
The creation works, but if I fetch the event the extended properties are nil. I want to achieve to store a custom field inside the event to recognise it when fetching.
Thanks a lot! Kate
I have figured it out.
'extended_properties': {
'private': {
'x' => 'y'
}
}
Using underscore instead of camel case. Maybe worth adding this to your docs?
@kirrg001 thank you for the follow up!