Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to move files or folders to the thrash with the google drive client

Open
#26,399 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ruby
Domain
api

Research direction

Start in generated/google-apis-drive_v3/lib/google/apis/drive_v3/service.rb at the update_file method referenced in the issue, and compare its available query parameters with the Drive v3 trash documentation. Verify the expected update request and confirm that the resulting call moves a file or folder to the trash.

Written by the indexing model from the issue text.

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 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

Dominant language
Ruby
Stars
2.9k
Forks
888
Avg merge
8m
Merged PRs (30d)
242

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-api-ruby-client

All issues in googleapis/google-api-ruby-client

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.