Issue 580 in google-gdata: YouTube API Delete Video Problem .Net

36 views
Skip to first unread message

google...@googlecode.com

unread,
Apr 6, 2012, 7:19:47 PM4/6/12
to gdata-dotnet-...@googlegroups.com
Status: New
Owner: ----

New issue 580 by mar...@gmail.com: YouTube API Delete Video Problem .Net
http://code.google.com/p/google-gdata/issues/detail?id=580

Hi, the Visual Studio C# reports object reference not set to an instance of
an object when trying to delete a video by using:
Uri videoEntryUrl = new
Uri("http://gdata.youtube.com/feeds/api/videos/11111111111");
Video video = request.Retrieve<Video>(videoEntryUrl);
//YOUTUBE BUG>>>
request.Delete(video);

i have check and video exists and its not null

descriptions also here
http://stackoverflow.com/questions/8712305/i-want-to-delete-a-video-from-my-channel-on-youtube-using-the-api

google...@googlecode.com

unread,
Apr 11, 2012, 7:06:27 PM4/11/12
to gdata-dotnet-...@googlegroups.com
Updates:
Status: ByDesign

Comment #1 on issue 580 by ccherub...@google.com: YouTube API Delete Video
Problem .Net
http://code.google.com/p/google-gdata/issues/detail?id=580

The Delete method works as expected if you use the right url, i.e. the one
from the /upload feed.

The entries in the /videos feed do not have an edit url which is the one
that must be used to send a delete request. I just updated the library
(rev. 1169) to return a more meaningful ArgumentNullException instead of
the generic null reference.

Please use this code to delete a video you uploaded:

YouTubeRequestSettings settings = new
YouTubeRequestSettings(YOUTUBE_CHANNEL, YOUTUBE_DEVELOPER_KEY, USERNAME,
PASSWORD);
YouTubeRequest request = new YouTubeRequest(settings);
Uri videoEntryUrl = new
Uri(String.Format("http://gdata.youtube.com/feeds/api/users/{0}/uploads/{1}",
YOUTUBE_CHANNEL, VIDEO_ID));


Video video = request.Retrieve<Video>(videoEntryUrl);

request.Delete(video);

google...@googlecode.com

unread,
Apr 14, 2012, 9:40:14 AM4/14/12
to gdata-dotnet-...@googlegroups.com

Comment #2 on issue 580 by mar...@gmail.com: YouTube API Delete Video
Problem .Net
http://code.google.com/p/google-gdata/issues/detail?id=580

thank you !

google...@googlecode.com

unread,
Jul 31, 2015, 12:57:01 AM7/31/15
to gdata-dotnet-...@googlegroups.com

Comment #3 on issue 580 by harikrus...@gmail.com: YouTube API Delete Video
Problem .Net
https://code.google.com/p/google-gdata/issues/detail?id=580

hi, i use this code..........
Uri videoEntryUrl = new
Uri(String.Format("http://gdata.youtube.com/feeds/api/users/default/uploads/{1}",
username, id));
Video video = request.Retrieve<Video>(videoEntryUrl);
//request.Delete()
request.Delete(video);

i retrive video but not delete it from youtube.
using this i have error like
"Execution of request failed:
http://gdata.youtube.com/feeds/api/users/2kOe45VjE9IVJBE7DtAUMw/uploads/XM5gXkPdFmQ"

plz reply
thanks.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages