kevin-m-kent / youtubeR

https://kevin-m-kent.github.io/youtubeR/
Other
2 stars 1 forks source link

yt_playlist_items_delete() function #14

Open jonthegeek opened 1 year ago

jonthegeek commented 1 year ago

I'll need this for R4DS (to remove things from the "edited" playlist). The id this asks for is an id that's only relevant inside the playlist. I think instead we'll ask the user for a playlist_id and video_id, and then look up that video's playlist_item_id via yt_playlist_items_list() and THEN delete (ie, this is another case where it's ok that the automatic function builder would get it wrong, and then we'll make it easier to use).

Although now that I say that we should probably supply the lowest-level version that just takes the playlist_item_id, and then wrap that; if you already have the full list from a playlist (like, for example, the "edited" playlist), you probably just want to delete them all off of the list as you process, by ID.