InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Google Has Released a YouTube SDK for .NET

Posted by Abel Avram on Feb 24, 2010

Sections
Development
Topics
.NET ,
Tools
Tags
SDK ,
GData ,
Google

Google has released a YouTube SDK for .NET (MSI) for those interested in programmatically accessing YouTube from a .NET or ASP.NET application.

The SDK contains a CHM help file for the YouTube API, a Visual Studio 2008 template and several application samples demonstrating the API possible usage: a tool for uploading video files to YouTube, an ASP.NET mini-website using AuthSub, an authorization service supported by YouTube, and an application which notifies on selected user YouTube activity.

The YouTube API is built on top of Google’s GData protocol (MSI), extending it with specific data classes contained in the Google.GData.YouTube namespace. GData is an open source protocol for web communication and used extensively by Google for many of its services: Blogger, Calendar, Picasa, YouTube, and others.

The following code sample taken from the SDK’s help file shows the usage of LINQ’s chained where clause in the context of accessing YouTube:

YouTubeRequestSettings settings = new YouTubeRequestSettings("NETUnittests", YTCLIENTID, YTDEVKEY);

YouTubeRequest f = new YouTubeRequest(settings);
settings.AutoPaging = true;
settings.Maximum = 200; //only 75 come back but that is a feature
Feed<Video> sfeed = f.GetStandardFeed(YouTubeQuery.MostPopular);

//put the entire list into a list.
var entries = sfeed.Entries.ToList();

var oneHunderTitles = from e in entries
                      where e.ViewCount > 100
                      where e.Rating > 2
                      where e.Updated < new DateTime(2008, 12, 4)
                      orderby e.Rating descending
                      orderby e.Title
                      select e;

foreach (var item in oneHunderTitles) {
    Console.WriteLine(item.Title);
}

//here is an inline orderby on title as a lambda
foreach (var item in entries.OrderBy(i => i.Title)) {
    Console.WriteLine(item.Title);
}

Console.WriteLine(sfeed.Entries.Count());
cool! by Lu Laser Posted
  1. Back to top

    cool!

    by Lu Laser

    Real glad to hear that;-)

Educational Content

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?