I follow the documentation there:
https://developers.google.com/drive/v2/reference/children/list
I would like to set a query in the parameters so i tried to simply do this:
$parameters = array();
$parameters['q'] = "My Query";
$children = $service->children->listChildren($folderId, $parameters);
As written in the doc:
Requests with children.list accept the q parameter, which is a search
query combining one or more search terms
But the q is not recognized, i get this error:
An error occurred: (list) unknown parameter: ‘q’
What is the right syntax?
Are you sure you are using the latest version of the PHP client library? I just tried with it and the
qparameter is supported when listing children.Also, make sure that the value of the
qparameter matches the search query syntax as explained at https://developers.google.com/drive/search-parameters.For instance, here is a valid children list request that specifies a query parameter: