google-code-export / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
0 stars 0 forks source link

Google API Version 3 YouTubeUploader sample (Derived from Google Data API Version 2 YouTubeUploader sample) #438

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which Google API and version (e.g. Google Tasks API version 1)?
Google.Apis.YouTube.V3
Google.Apis.Auth

What should the sample demonstrate (e.g. using OAuth2, using a specific
feature of that API)?
An updated YouTubeUploader .NET program that uses Version 3 ResumableUploader 
with simultaneous uploads, retries and YouTube login. See details below.

Platform (e.g. Windows, Mono, Silverlight, WP7)?
A Windows 7 or 8 EXE using .NET Framework 4.0

External references, such as API reference guide?

Please provide any additional information below.

There is so much difference between Google Data API (Version 2) and Google API 
(Version 3) for resumableupload to YouTube, that a YouTubeUploader program 
(http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/samples/Yo
uTubeUploader) converted from Google Data API (Version 2) to Google API 
(Version 3) would be extremely helpful.

Notes:
1. The sample should show how to set Google API (Version 3) equivalent of 
AccessControls attributes. This is sample using Google Data API (Version 2):
Video ObjUploadThisVideo = new Video();
ObjUploadThisVideo.Title = row.Cells(COLUMNINDEX_TITLE).Value.ToString();
YtAccessControl ac1 = new YtAccessControl("rate", (string)(mnuRate.Checked ? 
"allowed" : "denied"));
YtAccessControl ac2 = new YtAccessControl("comment", 
(string)(mnuComment.Checked ? "allowed" : "denied"));
YtAccessControl ac3 = new YtAccessControl("commentVote", 
(string)(mnuCommentVote.Checked ? "allowed" : "denied"));
YtAccessControl ac4 = new YtAccessControl("videoRespond", 
(string)(mnuVideoRespond.Checked ? "allowed" : "denied"));
YtAccessControl ac5 = new YtAccessControl("embed", (string)(mnuEmbed.Checked ? 
"allowed" : "denied"));
YtAccessControl ac6 = new YtAccessControl("syndicate", 
(string)(mnuSyndicate.Checked ? "allowed" : "denied"));
YtAccessControl ac7 = new YtAccessControl("list", (string)(mnuList.Checked ? 
"allowed" : "denied"));
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac1);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac2);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac3);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac4);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac5);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac6);
ObjUploadThisVideo.YouTubeEntry.AccessControls.Add(ac7);

2. The sample should show how to login to upload to a channel without requiring 
the user to enter a Username and Password. Username and Password could be 
hardcoded, read from a registry entry or a data file. The channel is associated 
with the Username. An alternative would be to login as a service using a 
certificate that is associated with a YouTube channel. 

3. As does the current YouTubeUploader, the sample should demonstrate multiple 
simultaneous uploads and retry attempts after an error.

Thank you

Original issue reported on code.google.com by MikeMe...@gmail.com on 2 Jan 2014 at 6:46