karishmal / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Throwing error if "Dimensions" parameter of "ReportResource.GetRequest" to get the response by dimensions. #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Created object 
Line 1: ReportResource.GetRequest request = reportResource.Get("2012-02-20",  
"2010-01-01", metrics, "ga:xxxxxx"); 
2. request.Dimensions = "ga:campaign" ;
3. GaReport detailResponse = request.Fetch();   

What is the expected output? What do you see instead?
Response should return the result set by the dimensions, but its throwing the 
exception "cannot convert value "ga:campaign" to 
System.Collections.Generic.IList1[System.String]" at request.Fetch();. 
request.Dimensions is of datatype "string", but it seems JSONserializer 
expecting it as IList<string> or so.

What version of the product are you using? On what operating system?
Google API v3 - .Net client library
Operating System - Windows 7 Professional N

Please provide any additional information below.

As we are migrating to use Google API 3.0 by using .Net client library, can you 
please let us know by when this issue can be resolved so that we can decide 
whether we need to use client library or Webrequests?

Awaiting your reply,
Raheem MA

Original issue reported on code.google.com by raheem...@gmail.com on 22 Feb 2012 at 6:27

GoogleCodeExporter commented 9 years ago
Hello friends...

Following is the tweak we could find out to fix the above issue with Dimensions 
property. The required steps are documented in the attached word file.

Let us know if any issues with this.

Thank you,
Raheem MA

Original comment by raheem...@gmail.com on 22 Feb 2012 at 2:54

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A less intrusive fix is to modify the auto-generated source for 
Google.Apis.Analytics.v3.cs to expect a string instead of a list. 

I have attached a patch that does this. To use it, download the source for 
Google.Apis.Analytics.v3.cs (link here: 
http://code.google.com/p/google-api-dotnet-client/wiki/APIs#Google_Analytics_API
) and apply this patch. Remove the reference to the 
Google.Apis.Analytics.v3.dll in your project and include the modified source in 
your project instead.

Original comment by dain.kap...@gmail.com on 24 Feb 2012 at 7:31

Attachments:

GoogleCodeExporter commented 9 years ago
Anyone got the Google.Apis.Analytics.v3.cs file translated into a .vb file?

Original comment by nd.el...@gmail.com on 21 Mar 2012 at 5:44

GoogleCodeExporter commented 9 years ago
This issue seems to be rectified in the Latest Stable Release (as of Mar 16th, 
2012) available from here:
http://code.google.com/p/google-api-dotnet-client/wiki/Downloads#Latest_Stable_R
elease

Note:
1/ The Analytics.v3.ReportResource.GetRequest becomes 
Analytics.v3.DataResource.GaResource.GetRequest
2/ The Data.GaReport becomes Data.GaData
etc.

It's a pity I now run into a new error instead:
Google.Apis.Requests.RequestError Invalid Value [400] Errors [ Message[Invalid 
Value] Location[ - ] Reason[invalid] Domain[global] ]

Regards
Nigel

Original comment by nd.el...@gmail.com on 21 Mar 2012 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 21 Mar 2012 at 7:23