I am creating an application with which users can create playlists using drag and drop. I want them to be able to delete videos from the playlist. But I am embarrassed with the documents.
I am using the youtube api php client library. Keep in mind that the user is logged in.
$youtubeService = new Google_YouTubeService($client);
$playlistItems = $youtubeService->playlistItems;
$deleteVid = $playlistItems->delete($videocode);
And this is the delete function from the client library:
public function delete($id, $optParams = array()) {
$params = array('id' => $id);
$params = array_merge($params, $optParams);
$data = $this->__call('delete', array($params));
return $data;
}
There is nowhere where I can indicate which playlist to delete the video. Does anyone have an idea how to do this? Other playlistItem functions use the Google_PlaylistItem object as a parameter. But this is just a line for the video code ... So strange, I can’t figure it out on my own.
Any help would be greatly appreciated.