googleapis / googleapis/google-api-ruby-client
Unable to move files or folders to the thrash with the google drive client
- Dominant language
- Ruby
- Stars
- 2.9k
- Forks
- 888
- Avg merge
- 6m
- Merged PRs (30d)
- 218
Description
**Is your feature request related to a problem? Please describe.**
Using the google drive v3 client, I want to move a file or folder to the trash.
The [general documentation](https://developers.google.com/workspace/drive/api/guides/delete?hl=de#file-trash) states that this should be possible via a query parameter `thrashed=true` in the `update_file` endpoint.
However, the ruby client does not offer a query parameter for the update file method (or maybe I do not understand how to add it):
https://github.com/googleapis/google-api-ruby-client/blob/48df6afb5f72f57b7ad725bdcd2caf398990ed21/generated/google-apis-drive_v3/lib/google/apis/drive_v3/service.rb#L2001
**Describe the solution you'd like**
I want to use the update_file method, with e.g. `service.update_file("my-folder-id", supports_all_drives: true, thrashed: true, options: { retries: 3 })` or similar.
**Describe alternatives you've considered**
I tried to construct the query manually, by using `service.send(:create_simple_command, ...)` etc.
However, thrashing the file still did not work. Even though when using `get_file` with `fields = 'capabilities`, it returns true for `canThrash`
Contributor guide
Assessment
This issue has not been assessed yet.