A small C# libary that wraps the Google.Apis.YouTube .NET client.
- Allow for paginated requests to be executed concurrently (by generating pageTokens).
- Extract large amounts of API data in a short period of time.
nuget : https://www.nuget.org/packages/YouTubeDataApiWrapper/
For optimal usage the maximum number of connections must be raised by adding the following to the app.config
<configuration>
...
<system.net>
<connectionManagement>
<add address="*" maxconnection="1000" />
</connectionManagement>
</system.net>
...</configuration>
var ytService = new YouTubeService(/*...Create Authorized YouTubeService*/)
//Get 5000 videos from a uploads playlist
var plistItemsListRequestBuilder = new PlaylistItemsListRequestBuilder(ytService, "snippet")
{
PlaylistId = "UUsvaJro-UrvEQS9_TYsdAzQ"
};
var plistItemsRequestService =
new YoutubeListRequestService<PlaylistItemsResource.ListRequest, PlaylistItemListResponse, PlaylistItem>(plistItemsListRequestBuilder);
var playlistItems = await plistItemsRequestService.ExecuteConcurrentAsync(new PageTokenRequestRange(5000));