/ / How to get the hierarchy of the parents to maintain breadcrumb in my app using google drive Api - google-drive-sdk

どのようにGoogleのドライブを使用して私のアプリでブレッドクラムを維持するために両親の階層を取得するApi - google-drive-sdk

I would like to show the breadcrumb of the files/folders in my page by fetching the complete hierarchy of the parents of a resource. As per my reading, google api does not provide such query or api. My thinking is that I can maintain the breadcrumb in my session which is a headache, as clicking on the breadcrumb should be able to show the particular files/subfolders etc. And managing the breadcrumb through the session looks like a nightmare in my view.

I think google api should have some API that can get all the metadata/details at least the resourceid and the titles of the parents and the grandparents. If any one has any spare know how on this, please do point me.

回答:

回答№1は1

What you ask is not possible because a folder/file can have multiple parents. You neex to manually call getParents, decide which one if more than one, and keep going up until you reach root.