How to update parents of a directory in google drive using Drive v2

15 views
Skip to first unread message

soujanya...@navaratan.com

unread,
Jul 13, 2016, 10:14:02 AM7/13/16
to Google API Client for Ruby
Hi all,
I am using RUBY language to implement google drive, I have three folder in google drive(d1, d2, d3), and d1 is parent to d2, now I wants update a parents of d2 like remove d1 parent from d2 and add d3 as parent or keep both as a parents.
I tried like below. but i getting undefined method update_file.

file = drive_service.update_file(file_id,
                                 add_parents
: folder_id,
                                 remove_parents
: previous_parents,
                                 fields
: 'id, parents')
Reply all
Reply to author
Forward
0 new messages