Google APIs Client Library for .NET (Beta)

SEP 02, 2011
Yaniv
Matthias
By Yaniv Inbar and Matthias Linder, Client APIs Team

Over the last year, we’ve launched a number of developer APIs, such as the Tasks API, the Books API, the Search API for Shopping, and the CustomSearch API. At Google I/O we announced a number of developer tools, such as the APIs Explorer and the APIs Console. Over that time, we have been actively developing a library to support the Microsoft .NET Framework.

Today we are announcing a major milestone by releasing the Beta version of the open source Google APIs Client Library for .NET. This includes service-specific libraries and samples for Google APIs, built on our new client library generation infrastructure. We're now comfortable enough with the stability and features of the library that we want you to start building real production applications. Currently we support Microsoft .NET 3.5 and 4.0 and Mono 2.6.7 (and higher). In the future we hope to also support Windows Phone 7 and Microsoft Silverlight.

To demonstrate how easy to use the library can be, here is a snippet from the goo.gl sample to shorten a URL using the goo.gl service:

// Create an instance of the UrlShortener-service.
var service = new UrlshortenerService();

// Make a "Shorten URL" request.
string urlToShorten = "http://maps.google.com/";
Url response =
  service
.Url.Insert(new Url { LongUrl = urlToShorten }).Fetch();

// Print the shortened url.
string shortUrl = response.Id;
Console.WriteLine(urlToShorten + " -> " + shortUrl);
To use this code, you only have to add references to the Google APIs Client Library for .NET, and the Google.Apis.Urlshortener.v1.dll.

Please send us your feedback on how we can make your experience with the library easier and better suited for your needs.

Since Google I/O 2010, we've been developing APIs that can provide descriptions of themselves via metadata. This new technique makes it easier to create and maintain client libraries that support more languages, work with more APIs, and are easier to use than ever before. This post announces one of several recent major milestones for our client libraries.


Yaniv Inbar is a Senior Software Engineer and Technical Lead of the Google APIs Client Libraries & Tools team. Yaniv has worked at Google for 5 years, and has a total of 12 years industry experience as a software engineer.

Matthias Linder is a Software Engineering Intern. Matthias is interested in game development, microcontrollers, and paragliding.


Posted by Scott Knaster, Editor