I am playing around with Google calendar API and came across this:
The Ruby code doesn't seem to be Ruby code so I ported information from the calendar_list and calendar.get to this. I'm not sure why the parameter summary is not being picked up as a title.
def create
@auth = request.env["omniauth.auth"]
@token = @auth["credentials"]["token"]
client = Google::APIClient.new
client.authorization.access_token = @token
service = client.discovered_api('calendar', 'v3')
@result = client.execute(
:api_method => service.calendars.insert,
:parameters => {"summary" => 'Calendar Title'},
:headers => {'Content-Type' => 'application/json'})
end
Which results in an error of
--- !ruby/object:Google::APIClient::Schema::Calendar::V3::Calendar
data:
error:
errors:
- domain: global
reason: required
message: Missing title.
code: 400
message: Missing title.