0

I want to make a program with the google drive API. But I am not sure if this is possible. I want to make a program who explores my shared folders. Go into the last folder, give me all global information (date/owner/what inside/size of the folder/if he got folders in him). And after coming back in, "his father folder" and continue to give me the same information. BUT ! If the "father folder" has a second child, he gives me the second child information first.

I just want to know if this is possible and if is not too complicated( I an not an expert). Thanks for your help.

2 Answers2

0

Hello every action ou described is possible ! Have a look at https://developers.google.com/drive/v3/reference/

You can list, filter, get informations on files and folders delete, share, insert

Good luck

Adrien QUINT
  • 589
  • 4
  • 18
0

You have to use sharedWithMe, when using the Querying for Files:

The "Shared with me" category includes files owned and shared by others users which have been either: directly shared with the current user, a group containing the current user, or have been accessed by the current user.

Here is sample snippet that search for files shared with the authorized user with "hello" in the name:

sharedWithMe and name contains 'hello'

For "Go into the last folder, give me all global information (date/owner/what inside/size of the folder/if he got folders in him). And after coming back in, "his father folder" and continue to give me the same information. BUT ! If the "father folder" has a second child, he gives me the second child information first."

This will depend on your implementation but you have to recursively get the children of a folder type file. As stated in this related SO post,"stop thinking about Drive as being a tree structure. It isn't. "Folders" are simply labels, eg. a file can have multiple parents."

After getting the desire fileID with your specific qualifications, get the details using file.get or include the details you want to get in file.list.

Hope this helps.

Mr.Rebot
  • 6,703
  • 2
  • 16
  • 91