I wonder if anyone has got any further than me using the new Search Analytics functions of the Google Webmaster Tools API via .Net?
I am using the Google.Apis.Webmasters.v3 Nuget package and have got as far as authenticating and connecting (using a Service Account)
However I'm struggling to get anywhere with Search Analytics.
I couldn't find any code samples online so have been guided by the Class info at https://developers.google.com/resources/api-libraries/documentation/webmasters/v3/csharp/latest/annotated.html and a lot of guesswork.
Here is the code I am using:
SearchanalyticsResource mySearchanalyticsResource = new SearchanalyticsResource(service);
SearchAnalyticsQueryRequest myRequest = new SearchAnalyticsQueryRequest();
myRequest.StartDate = "2015-08-01";
myRequest.EndDate = "2015-08-31";
myRequest.RowLimit = 10;
SearchanalyticsResource.QueryRequest myQueryRequest = mySearchanalyticsResource.Query(myRequest, site.SiteUrl);
SearchAnalyticsQueryResponse myQueryResponse = myQueryRequest.Execute();
It runs OK until the Execute method when I get "An Error occurred, but the error response could not be deserialized". Exception detail below...
Newtonsoft.Json.JsonReaderException {"Error parsing NaN value. Path '', line 0, position 0."}
Any help or code samples would be very gratefully received!