Skip to content
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

Cannot create extendedProperties #3207

Open
kirrg001 opened this issue Mar 10, 2021 · 2 comments
Open

Cannot create extendedProperties #3207

kirrg001 opened this issue Mar 10, 2021 · 2 comments
Labels
type: docs Improvement to the documentation for an API.

Comments

@kirrg001
Copy link

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

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 11, 2021
@kirrg001
Copy link
Author

I have figured it out.

        'extended_properties': {
          'private': {
            'x' => 'y'
          }
        }

Using underscore instead of camel case. Maybe worth adding this to your docs?

@danoscarmike danoscarmike added type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Mar 12, 2021
@danoscarmike
Copy link
Contributor

@kirrg001 thank you for the follow up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

3 participants