Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Google Analytics API client libraries? (google-api-dotnet-client vs. google-gdata)

What is the difference between the Google APIs Client Library for .NET (google-api-dotnet-client) and .NET library for the Google Data API (google-gdata) as they pertain to the Google Analytics API?

like image 315
Dragouf Avatar asked Feb 01 '12 17:02

Dragouf


People also ask

What is Google client library?

Client libraries make it easier to access Google Cloud APIs from a supported language. While you can use Google Cloud APIs directly by making raw requests to the server, client libraries provide simplifications that significantly reduce the amount of code you need to write.

What is a client library?

Let's start with the basics: “what is a client library?” In short, a client library is a collection of code specific to one programming language that makes it easier to use an API. See, almost all web APIs communicate by means of HTTP, and pretty much every programming language supports HTTP.

Is Google Analytics an API?

The Google Analytics Reporting API v4 provides programmatic methods to access report data in Google Analytics (Universal Analytics properties only). With the Google Analytics Reporting API, you can: Build custom dashboards to display Google Analytics data.

What is a Python client library?

04/01/2022 Contributors. The NetApp ONTAP Python client library is a package you can install and use to write scripts that access the ONTAP REST API.


1 Answers

In my (limited) experience:

  • GData has a better integrated OAuth2 support, which is easier to use.

  • GoogleApiDotnetClient services return specific subtypes while GData returns base types. For example, a GoogleApiDotnetClient calendar events request returns something typed IEnumerable<Event>, while GData returns an IEnumerable<AtomEntry> where each instance is actually an EventEntry.

  • GoogleApiDotnetClient instances are simpler, for example an Event.Summary is a string field whereas GData's Summary is an AtomTextConstruct which has a Text property.

  • GoogleApiDotnetClient does not support some APIs, notably Spreadsheets.

  • The dates tend to be strings in GoogleApiDotnetClient but proper DateTime values in GData.

  • Neither has any XML comments whatsoever, sadly.

So far I have a preference for GoogleApiDotnetClient, but frankly, both of them have lots of space for improvement.

like image 111
Roman Starkov Avatar answered Sep 22 '22 14:09

Roman Starkov