BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Portable Class Libraries for Google APIs

| by Jonathan Allen Follow 55 Followers on Jul 02, 2013. Estimated reading time: 2 minutes |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login 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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT