The adsense client doesn't support multiple metrics and dimensions when
generating a report
(https://github.com/google/google-api-go-client/blob/master/adsense/v1.4/adsense
-gen.go#L2335)
Methods "Dimension" and "Metric" accepts a single value string instead of an
expected []string slice
(https://github.com/google/google-api-go-client/blob/master/adsense/v1.4/adsense
-gen.go#L2353,
https://github.com/google/google-api-go-client/blob/master/adsense/v1.4/adsense-
gen.go#L2382).
Those accepted values currently are considered a single query param
(https://github.com/google/google-api-go-client/blob/master/adsense/v1.4/adsense
-gen.go#L2430)
AdSense Management API supports multiple metrics and dimensions
(https://developers.google.com/adsense/management/metrics-dimensions), on API
Explorer
(https://developers.google.com/apis-explorer/#p/adsense/v1.4/adsense.accounts.re
ports.generate) you can see that there is an "add more" button to add multiple
metrics and dimension, those are appended as multiple query parameters:
"&dimension=AD_UNIT_ID&dimension=AD_UNIT_NAME&metric=AD_REQUESTS&metric=EARNINGS
"
Just to get it working i have forked the repository and committed a simple fix
(https://github.com/Idhor/google-api-go-client/commit/9e09a005b99267d895e0bf82c8
66af73ae3b0028)
Original issue reported on code.google.com by luca.loo...@gmail.com on 29 Mar 2015 at 8:38
Original issue reported on code.google.com by
luca.loo...@gmail.com
on 29 Mar 2015 at 8:38