我试图从我的主日历中找到所有空闲时间,但我无法让查询识别我的参数。
在我的控制器中,我有:
@freetimes = client.execute(
:api_method => service.freebusy.query,
:parameters => {
'timeMin' => '2013-06-15T17:06:02.000Z',
'timeMax' => '2013-06-29T17:06:02.000Z',
'items' => [{'id' => 'myemail@gmail.com'}]
},
:headers => {'Content-Type' => 'application/json'})
我得到的回应是:
--- !ruby/object:Google::APIClient::Schema::Calendar::V3::FreeBusyResponse
data:
error:
errors:
- domain: global
reason: required
message: Missing timeMin parameter.
code: 400
message: Missing timeMin parameter.
但是表明它采用了参数,但它们没有附加到查询中:
--- !ruby/object:Google::APIClient::Result
request: !ruby/object:Google::APIClient::Request
parameters:
timeMin: '2013-06-15T17:06:02.000Z'
timeMax: '2013-06-29T17:06:02.000Z'
items:
- id: myemail@gmail.com
任何解决此问题的帮助将不胜感激!