googleapis/google-api-ruby-client

unknown keyword: conference_data_version

Closed this issue · 3 comments

Ruby Version: 2.3.4
Rails Version: 5.1

When trying to create an event to calendar, getting unknown keyword: conference_data_version

event = Google::Apis::CalendarV3::Event.new({
  summary: "Summary",
  location: "N/A",
  description: "Conf. Title",
  start:  {
    time_zone: time_zone_str,
    date_time: start_time.to_datetime,
  },
  end:  {
    time_zone: time_zone_str,
    date_time: end_time.to_datetime,
  },
  conference_data: {
    create_request: {
      request_id:"xdfds-rbaaaa-dfadd",
      conference_solution_key: {
          type:"hangoutsMeet"
      }
    }
  },
  attendees: attendees,
  reminders: {
    use_default: false,
    overrides: [
      Google::Apis::CalendarV3::EventReminder.new(reminder_method:"popup", minutes: 10),
      Google::Apis::CalendarV3::EventReminder.new(reminder_method:"email", minutes: 20)
    ]
  },
  notification_settings: {
    notifications: [
    {type: 'event_creation', method: 'email'},
    {type: 'event_change', method: 'email'},
    {type: 'event_cancellation', method: 'email'},
    {type: 'event_response', method: 'email'}
    ]
  },
  'primary': true
})

response = client.insert_event('primary', event, conference_data_version: 1)

NOTE: Assume start time, end time, time_zone_str, attendees are correct.

Also tried to patch and update the event but throwing same error.

@apsharma26 thanks for reaching out. Can you share how you have instantiated client?

ir-h commented

Hi @danoscarmike I am also facing the same issue and the client is instantiated using Google::Apis::CalendarV3::CalendarService.new

dazuma commented

Please make sure you have the latest version of the calendar API client (google-apis-calendar_v3 version 0.27.0). The current code does look like it understands the conference_data_version keyword argument. In particular, do not use the old google-api-client monolithic client, as that is deprecated and is out of date.