为了检索文件夹的内容,我必须使用以下网址 https://www.googleapis.com/drive/v2/files?q='root ' 所以我认为它应该通过传递一个附加参数来工作
@client.execute(
:api_method => @drive.files.list ,
:parameters =>{q=> "title='root'" })
但这不起作用
发生错误:{"errors"=>[{"domain"=>"global", "reason"=>"invalid", "message"=>"Invalid Value", "locationType"=>"parameter", " location"=>"q"}], "code"=>400, "message"=>"无效值"}
当我看到请求 uri 时,这很明显
https://www.googleapis.com/drive/v2/files?q=title%253D%27levelA%27
我的第一次尝试是用户 URI.encode "title='root'" 这也不起作用。我真的不知道如何保留单引号?
最好的,菲利普
ps:提到的gem的链接http://rubydoc.info/github/google/google-api-ruby-client/frames