javascript - Using Parameters on a Google Drive API request? -


i trying make request on google drive api, , had questions. want search specific folder files, use q parameter in request follows, string (in case called example):

var request = gapi.client.drive.files.list({     'q': "'example' in parents" }); 

now, if want same thing, instead pass parameter in call, follows, not work.

var test = 'example' var request = gapi.client.drive.files.list({    'q': "'test' in parents" }); 

is there way can pass variable api call?

its returning 400 because you're not following right syntax using q. search files section of documentation discusses this. basically, q needs have name, operator , value passed have valid query.

hopefully helps issue.

happy coding!


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -