Hi,
I'd like to know if there is a way to get more than one metric from a
single API call. I'd
like to get around 5-10 metrics in a single request itself so that I
don't waste requests/bandwidth.
I tried the following url in the api playground
https://www.googleapis.com/adsense/v1.1/reports?endDate=2012-05-07&startDate=2012-05-07&metric=PAGE_VIEWS,EARNINGS
and got the following response
HTTP/1.1 400 Bad Request
status: 400
content-length: 419
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-google-cache-control: remote-fetch
expires: Mon, 07 May 2012 07:52:12 GMT
server: GSE
via: HTTP/1.1 GWA
cache-control: private, max-age=0
date: Mon, 07 May 2012 07:52:12 GMT
x-frame-options: SAMEORIGIN
content-type: application/json; charset=UTF-8
-content-encoding: gzip
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidParameter",
"message": "Invalid value 'PAGE_VIEWS,EARNINGS'. Values must match
the following regular expression: '[a-zA-Z_]+'",
"locationType": "parameter",
"location": "metric[0]"
}
],
"code": 400,
"message": "Invalid value 'PAGE_VIEWS,EARNINGS'. Values must match
the following regular expression: '[a-zA-Z_]+'"
}
}
If anyone knows of a solution, please do let me know.
Thanks.