Google Drive Api (V2) `corpora` choices -


what possible choices corpora , mean?

i want list of files have access inside directory, using .files().list( ... )

https://developers.google.com/drive/v2/reference/files/list

i used run following code worked:

searchparameterstring = "'" + folderid + "' in parents" #note there return limit of 460 files (falsly documented 1000) drivefileitems = [] pagetoken = none while true:     try:         drivefilesobject = service.files().list(             q           = searchparameterstring,             #corpora     = 'domain', #'default',#searchowners,              corpus     = 'domain',  #----> depricated!!!              maxresults  = 200,             pagetoken   = pagetoken,             ).execute()          drivefileitems.extend(drivefilesobject['items'])         pagetoken = drivefilesobject.get('nextpagetoken')         if not pagetoken:             break     except errors.httperror, error:         print 'an error occurred: %s' % error         break 

and above code broke me on june 25. following error message:

https://www.googleapis.com/drive/v2/files?q=%27___myfolderidhere___%27+in+parents&alt=json&corpus=domain&maxresults=200 returned "invalid query">

and figured out because deprecated parameter corpus in favor of corpora

what possible choices google drive api corpora ? , mean?

corpora = 'domain',   #does not work 

how make sure getting full list of files, instead of files own? (previously had switch default domain because had sorts of problems not getting full file lists, , ended uploading many many duplicates while trying use drive api sync directories across machines)

i found this: https://github.com/google/google-api-go-client/issues/218

and this: https://godoc.org/golang.org/x/oauth2/jwt#config

but don't know means impersonate user, nor think want so.

edit: happen using python - question language agnostic

i think can see in migrate drive v2, options are:

method       parameter         alternative  files.list  corpus=default  corpus=user files.list  corpus=domain   corpus=domain 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -