def post(self, playlist_id):
     yt_service_for_owner = youtubeutils.create_youtube_service(
         self.owner_oauth_token)
     response = yt_service_for_owner.DeletePlaylistVideoEntry(
         self.playlist_uri, self.playlist_entry_id)
     assert response
     youtubeutils.write_playlist(self, yt_service_for_owner, playlist_id,
                                 channelutils.notify_playlist_listeners)
 def post(self, playlist_id):
     position = int(self.request.get("position"))
     yt_service_for_owner = youtubeutils.create_youtube_service(
         self.owner_oauth_token)
     response = yt_service_for_owner.UpdatePlaylistVideoEntryMetaData(
         self.playlist_uri, self.playlist_entry_id, None, None, position)
     assert response
     youtubeutils.write_playlist(self, yt_service_for_owner, playlist_id,
                                 channelutils.notify_playlist_listeners)
 def post(self, playlist_id):
   position = int(self.request.get("position"))
   yt_service_for_owner = youtubeutils.create_youtube_service(
     self.owner_oauth_token)
   response = yt_service_for_owner.UpdatePlaylistVideoEntryMetaData(
     self.playlist_uri, self.playlist_entry_id, None, None, position)
   assert response
   youtubeutils.write_playlist(self, yt_service_for_owner, playlist_id,
                               channelutils.notify_playlist_listeners)
 def post(self, playlist_id):
   video_id = self.request.get("video_id")
   position = self.request.get("position", None)
   playlist_url = youtubeutils.PLAYLIST_URL_PREFIX + playlist_id
   yt_service_for_owner = youtubeutils.create_youtube_service(
     self.owner_oauth_token)
   response = youtubeutils.add_video_to_playlist(yt_service_for_owner,
                                                 playlist_url, video_id,
                                                 position)
   assert response
   youtubeutils.write_playlist(self, yt_service_for_owner, playlist_id,
                               channelutils.notify_playlist_listeners)
예제 #5
0
 def post(self, playlist_id):
     video_id = self.request.get("video_id")
     position = self.request.get("position", None)
     playlist_url = youtubeutils.PLAYLIST_URL_PREFIX + playlist_id
     yt_service_for_owner = youtubeutils.create_youtube_service(
         self.owner_oauth_token)
     response = youtubeutils.add_video_to_playlist(yt_service_for_owner,
                                                   playlist_url, video_id,
                                                   position)
     assert response
     youtubeutils.write_playlist(self, yt_service_for_owner, playlist_id,
                                 channelutils.notify_playlist_listeners)