-
Notifications
You must be signed in to change notification settings - Fork 866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Calendar) Event Reminders Overrides Option Broken #470
Comments
Will have the sample updated. The reminders part likely should read:
|
I discovered, after reviewing the source, that |
I had the same issue and stop using reminder but change the default setting from Google calendar setting.. |
I have just found that my event reminders that were set as popup do not show in Google Calendar on the pc things seem to have changed? |
@sqrrrl The reminders property on Google::Apis::CalendarV3::Event does not seem to deserialize either. Think this is a Google::Apis::CalendarV3::EventReminders problem as I am failing the deserialize default_reminders on Google::Apis::CalendarV3::Events too.
serializes to
|
Did some investigation here. The original report from @LaMarseillaise remains pertinent: the Ruby sample is completely wrong. (For starters, beyond the syntax issues, the Ruby client simply does not translate nested hashes in this way. It needs to be constructed object-by-object.) I will fix up that sample. There appear to be several other reports piled on, but are either unrelated or cannot be reproduced. In particular, I tried reproducing @nicholaskim94 's deserialization issue but was unsuccessful. Executing the deserialization code used in the client: Google::Apis::CalendarV3::Events::Representation.new(Google::Apis::CalendarV3::Events.new).from_json(input_string) yields the correct result with the correct reminders. It is possible that something was fixed since that report. I will get the Ruby sample fixed and close this issue. |
No wonder I forgot! My post was Feb 2017...! |
Yes, really sorry about that. This repo was bounced around a few teams since then, and a bunch of the issues got neglected. I'm trying to go through and fix and close things now. |
I am not sure how to interface such code into my project. Or is this something you guys need to do? |
Looks like I am not able to edit the sample directly. So I reported this upstream to the documentation team: https://issuetracker.google.com/issues/143895117 Please follow that issue for further updates. For reference, the following corrected sample should work: event = Google::Apis::CalendarV3::Event.new(
summary: 'Google I/O 2015',
location: '800 Howard St., San Francisco, CA 94103',
description: 'A chance to hear more about Google\'s developer products.',
start: Google::Apis::CalendarV3::EventDateTime.new(
date_time: '2015-05-28T09:00:00-07:00',
time_zone: 'America/Los_Angeles'
),
end: Google::Apis::CalendarV3::EventDateTime.new(
date_time: '2015-05-28T17:00:00-07:00',
time_zone: 'America/Los_Angeles',
),
recurrence: [
'RRULE:FREQ=DAILY;COUNT=2'
],
attendees: [
Google::Apis::CalendarV3::EventAttendee.new(
email: 'lpage@example.com'
),
Google::Apis::CalendarV3::EventAttendee.new(
email: 'sbrin@example.com'
)
],
reminders: Google::Apis::CalendarV3::Event::Reminders.new(
use_default: false,
overrides: [
Google::Apis::CalendarV3::EventReminder.new(
reminder_method: 'email',
minutes: 24 * 60
),
Google::Apis::CalendarV3::EventReminder.new(
reminder_method: 'popup',
minutes: 10
)
]
)
)
result = client.insert_event('primary', event)
puts "Event created: #{result.html_link}" @ajtruckle I'm not sure what you're asking. You should be able to create a client object of type |
The Reminders field does not populate correctly when I instantiate a
Google::Apis::CalendarV3::Event
object. This causesinsert_event
to fail when the:reminders
option is passed, effectively preventing me from adding reminders to an event.This is the example code I found in the API reference. There are several problems with it. I have been able to send requests successfully without reminders.
Also, there should not be a method named
end
.The text was updated successfully, but these errors were encountered: