blinkpy icon indicating copy to clipboard operation
blinkpy copied to clipboard

Add 'delete' and 'delete all' endpoints to library

Open ossumpossum opened this issue 4 years ago • 6 comments

It would be quite helpful to have the delete and deleteall endpoints implemented in order to effectively manage storage by being able to delete either specific videos or all the videos currently stored.

ossumpossum avatar Jan 21 '21 16:01 ossumpossum

maybe add a parameter to download_videos(), which deletes a video after a successful (!) download

MrToWy avatar Feb 08 '21 15:02 MrToWy

Just as an update, I took a look at this but there's more information needed in order to implement this. Performing a POST /api/v1/accounts/{AccountID}/media/delete results in the following response: {'message': 'Invalid Media List Format', 'code': 706}. I tried simple stuff like sending data in a format like {"media": [clips]} but always got the same response.

So this will remain on the to-do list. I was hoping it would be an easy add 😞

fronzbot avatar Feb 12 '21 04:02 fronzbot

Here is the relevant endpoint. If I have some time this weekend, I will give it a shot.

ruby-dev avatar Jul 16 '22 14:07 ruby-dev

can we delete videeos before a particlular datetime from cloud and sync module with this. for ex -

  1. i want to delete vidoes before "2022-11-23 00:00" from cloud
  2. i want to delete vidoes before "2022-11-23 00:00" from sync module 2

will we able to both 1) and 2) from this ?

Zw012d avatar Nov 23 '22 07:11 Zw012d

@fronzbot @ruby-dev will it be possible ?

arbuilder avatar Dec 02 '22 02:12 arbuilder

I think we have solved for item 2: https://github.com/fronzbot/blinkpy/blob/e98a587f383f4245c2a753be0fc9fa13dade8b2b/blinkpy/sync_module.py#L707-L721 You can poll the videos, create a list and delete them with this function.

mkmer avatar Jan 07 '24 16:01 mkmer