You can retrieve a video entry by following the example here:
http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Retrieving_Video_Entry
Because you want to be able to edit the video entry, you need to
retrieve it from the authenticated user's uploads feed, so the URL you
should use is slightly different. Use this instead:
Uri videoEntryUrl = new Uri("http://gdata.youtube.com/feeds/api/
users/default/uploads/VIDEO_ID");
Video video = request.Retrieve<Video>(videoEntryUrl);
Once you have your Video object, you can delete it:
http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Deleting_a_Video
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Jan 20, 3:57 am, Aditya Vashistha <adityavashistha.j...@gmail.com>
wrote:
> Hi Jeff,
>
> Thanks for your reply. I am using c#.net client library. The library
> provides no direct function to delete a video corresponding to a video
> id.
>
> Would appreciate if you can help me out!
>
> Thanks!
> -Aditya
> On Jan 7, 2:43 am, Jeffrey Posnick <je...@google.com> wrote:
>
>
>
>
>
>
>
> > Hello Aditya,
>
> > Yes, assuming you're authenticated as the video's owner. If you're
> > using a client library then the actual code will vary based on what
> > language you're using. The general protocol-level documentation for
> > deleting a video is at
>
> > http://code.google.com/apis/youtube/2.0/developers_guide_protocol_upd...
>
> > (USERNAME in that example URL can be set to "default", so the only
> > think you need to plug in is the VIDEO_ID value).
>
> > Cheers,
> > -Jeff Posnick, YouTube API Team
> > groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
> > @YouTubeDev
>
> > On Jan 5, 10:22 pm, Aditya Vashistha <adityavashistha.j...@gmail.com>
> > wrote:
>
> > > Hello,
>
> > > Is it possible to delete a video if we only know the video Id?
>
> > > Thanks!
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment