BT

Portable Class Libraries for Google APIs

by Jonathan Allen on Jul 02, 2013 |

Google has released a new beta of their SDK known as the Google APIs .NET library. This SDK is being offered as a Portable Class Library and covers 45 of Google’s APIs. This allows Google to offer one DLL that works across .NET, WinRT, Windows Phone, and Silverlight.

The Google APIs .NET library is now based on the PCL version of the HttpClient. This offers some significant advantages to the developer over the older versions because it exposes the new Task based asynchronous methods.

The downside of this is that the HttpClient is currently not licensed for use on non-Windows machines. This could be problematic for those who are using Mono to target Linux, iOS, or Android devices.

Google has extended the HttpClient with a class they call the ConfigurableMessageHandler. “This handler supports injection of unsuccessful response handlers, execute interceptors, and properties such as number of tries, application name (to use in the User-Agent header), etc.” The release notes continue,

We also added a BackOffHandler which supports automatically retries in the case of server errors (5xx) or exceptions during an HTTP request. This handler is attached by default to BaseClientService, but you can change this default behavior using the DefaultExponentialBackOffPolicy on BaseClientService.Initializer.

There are a few breaking changes since the 1.3 beta, specifically in the ClientServiceRequest. As per the new .NET design guidelines, the async methods that previously exposed a callback instead return an awaitable Task object.

The third party libraries needed for the Google APIs .NET library need to be installed via NuGet, but the library itself will not be available on NuGet until a future date.

For your convenience, here is a list of the APIs currently supported by the SDK.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT