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

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -