user2460546
user2460546

Reputation: 15

How to do a multiple folder removal in Google Drive API?

Is this now possible using Google Drive API or should I just send a multiple requests to accomplish this task?

By the way I'm using Python 2.7

Upvotes: 0

Views: 278

Answers (3)

chiragchavda.ks
chiragchavda.ks

Reputation: 530

you don't need to send multiple request just create request and add it to batch after that execute batch.

batch = BatchHttpRequest()

batch.add(service.files().delete(fileId=file_id), callback=callbackDummy)
batch.add(service.files().delete(fileId=file_id), callback=callbackDummy)
batch.execute(http=http)

to know more about it you can use this link.

Upvotes: 0

pinoyyid
pinoyyid

Reputation: 22286

You can batch your multiple deletes into a single HTTP request.

Upvotes: 0

Cabuxa.Mapache
Cabuxa.Mapache

Reputation: 771

As far as i know, you'll have to send multiple request to delete multiple files: https://developers.google.com/drive/v2/reference/files/delete. As you can see "delete" method receives a "fileId".

Upvotes: 1

Related Questions