Closed GoogleCodeExporter closed 8 years ago
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);
Original comment by ccherub...@google.com
on 11 Apr 2012 at 11:04
thank you !
Original comment by mar...@gmail.com
on 14 Apr 2012 at 1:40
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/XM5gXkPd
FmQ"
plz reply
thanks.
Original comment by harikrus...@gmail.com
on 31 Jul 2015 at 4:56
Original issue reported on code.google.com by
mar...@gmail.com
on 6 Apr 2012 at 11:15