相关疑难解决方法(0)

使用YouTube Data API v3从播放列表中删除视频

我正在构建一个应用程序,用户可以通过拖放创建播放列表.我希望他们能够从播放列表中删除视频.但我对文档感到困惑.

我正在使用youtube api php客户端库.请记住,用户已登录.

$youtubeService = new Google_YouTubeService($client);
$playlistItems = $youtubeService->playlistItems;
$deleteVid = $playlistItems->delete($videocode);
Run Code Online (Sandbox Code Playgroud)

这是客户端库中的删除功能:

 /**
 * Deletes a playlist item. (playlistItems.delete)
 *
 * @param string $id The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.
 * @param array $optParams Optional parameters.
 */

public function delete($id, $optParams = array()) {
  $params = array('id' => $id);
  $params = array_merge($params, $optParams);
  $data …
Run Code Online (Sandbox Code Playgroud)

php youtube youtube-api

3
推荐指数
1
解决办法
2279
查看次数

标签 统计

php ×1

youtube ×1

youtube-api ×1