?
Solved

YouTube API 3 removing video from playlist

Posted on 2014-09-22
5
Medium Priority
?
426 Views
Last Modified: 2014-10-07
Hello, does anybody have an idea how to delete a video from a youtube playlist?  I have the video id and I believe I actually have to capture the playlistItemID on the return call but the syntax I'm not sure how to construct. The video adding which I have working is below.

                <cfset jsondet={

                    "snippet" = {
                       "playlistId" = "#youtube_playlist_id#",
                      "description" = "#getPlaylistData.playlist_description#",
                       "resourceId" = {
                          "kind"    = "youtube##video",
                          "videoId" = "#getPlaylistData.video_id#"
                       },
                       "position"   = 0
                    }

                }>

Open in new window

0
Comment
Question by:brihol44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 1336 total points
ID: 40339930
Code is in coldfusion. Are PHP and JavaScript areas related at all?
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 664 total points
ID: 40340568
Here the doc :
https://developers.google.com/youtube/2.0/developers_guide_protocol_updating_and_deleting_videos#Deleting_a_video

So once you've the auth token and Id f the video send a DELETE to your video URL :

<cfhttp url="http://gdata.youtube.com/feeds/api/users/default/uploads/VIDEO_ID" method="delete" result="result">
        <cfhttpparam type="header" name="Authorization" value="GoogleLogin" auth=#variables.authtoken#">
        <cfhttpparam type="header" name="X-GData-Client" value="youtubecfc">
        <cfhttpparam type="header" name="X-GData-Key" value="key=#variables.devkey#">
</cfhttp>

Open in new window

0
 
LVL 62

Accepted Solution

by:
gheist earned 1336 total points
ID: 40340914
0
 

Author Comment

by:brihol44
ID: 40342226
In order of the comments...

1. I looked through the code examples (js, php, others) and none refer to json structure I need to verify deleting playlist items.

2. Thx, I'm using 3.0 api not 2.0.

3. That page I have read three times but its not clear how to formulate the structure to send to make the video go away.

Thx for the initial help
0
 

Author Closing Comment

by:brihol44
ID: 40367660
Thx!
0

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question