google-api-ruby-client icon indicating copy to clipboard operation
google-api-ruby-client copied to clipboard

GmailV1: servicebatch_delete_messages

Open Press10 opened this issue 5 years ago • 2 comments

https://github.com/googleapis/google-api-ruby-client/blob/48cd79bc2a508fa6baa0edf95748677df6aa8b46/generated/google/apis/gmail_v1/service.rb#L686

I've been beating my head against this batch_delete_messages method for a bit now and finally managed to get it working by updating from: batch_delete_messages_request_object = nil to: batch_delete_messages_request_object: nil

here is what some of my code looks:

messages_object = service.list_user_messages(user_id, q: "older_than:1d") message_ids = [] if messages_object.result_size_estimate > 0 messages_object.messages.each do |message_id| message_ids << message_id.id end end message_ids

then using that array of message_ids like so:

service.batch_delete_messages(user_id,batch_delete_messages_request_object: {"ids": message_ids})

would this be the correct fix to get this working? or am i passing in the message ids in wrong?

Press10 avatar Jul 16 '20 23:07 Press10

Hi @Press10 , thank you for the detailed bug report. Unfortunately, this issue tracker has limited visibility and scope - basically, it's just for reporting issues with the samples contained here and is only watched by the folks who work on these samples.

We are happy to help you move this bug to venues where it'll get the attention of the appropriate product teams.

I'm going to close this issue because the folks who own this repo have no actionable way to resolve it directly, but please let us know if there's anything we can do to help!

fhinkel avatar Dec 08 '20 14:12 fhinkel

Reopening as this appears to be client-related rather than service-related

dazuma avatar Dec 08 '20 16:12 dazuma