1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="adsense_v2.html">AdSense Management API</a> . <a href="adsense_v2.accounts.html">accounts</a> . <a href="adsense_v2.accounts.reports.html">reports</a> . <a href="adsense_v2.accounts.reports.saved.html">saved</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#generate">generate(name, currencyCode=None, dateRange=None, endDate_day=None, endDate_month=None, endDate_year=None, languageCode=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Generates a saved report.</p> 83<p class="toc_element"> 84 <code><a href="#generateCsv">generateCsv(name, currencyCode=None, dateRange=None, endDate_day=None, endDate_month=None, endDate_year=None, languageCode=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Generates a csv formatted saved report.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Lists saved reports.</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="close">close()</code> 95 <pre>Close httplib2 connections.</pre> 96</div> 97 98<div class="method"> 99 <code class="details" id="generate">generate(name, currencyCode=None, dateRange=None, endDate_day=None, endDate_month=None, endDate_year=None, languageCode=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code> 100 <pre>Generates a saved report. 101 102Args: 103 name: string, Required. Name of the saved report. Format: accounts/{account}/reports/{report} (required) 104 currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set. 105 dateRange: string, Date range of the report, if unset the range will be considered CUSTOM. 106 Allowed values 107 REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range. 108 CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided. 109 TODAY - Current day. 110 YESTERDAY - Yesterday. 111 MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12]. 112 YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12]. 113 LAST_7_DAYS - Last 7 days, excluding current day. 114 LAST_30_DAYS - Last 30 days, excluding current day. 115 endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 116 endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 117 endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 118 languageCode: string, The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag). 119 reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725). 120 Allowed values 121 REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone. 122 ACCOUNT_TIME_ZONE - Use the account timezone in the report. 123 GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles). 124 startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 125 startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 126 startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 127 x__xgafv: string, V1 error format. 128 Allowed values 129 1 - v1 error format 130 2 - v2 error format 131 132Returns: 133 An object of the form: 134 135 { # Result of a generated report. 136 "averages": { # Row representation. # The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. 137 "cells": [ # Cells in the row. 138 { # Cell representation. 139 "value": "A String", # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers. 140 }, 141 ], 142 }, 143 "endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Required. End date of the range (inclusive). 144 "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 145 "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 146 "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 147 }, 148 "headers": [ # The header information; one for each dimension in the request, followed by one for each metric in the request. 149 { # The header information of the columns requested in the report. 150 "currencyCode": "A String", # The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) of this column. Only present if the header type is METRIC_CURRENCY. 151 "name": "A String", # Required. Name of the header. 152 "type": "A String", # Required. Type of the header. 153 }, 154 ], 155 "rows": [ # The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. 156 { # Row representation. 157 "cells": [ # Cells in the row. 158 { # Cell representation. 159 "value": "A String", # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers. 160 }, 161 ], 162 }, 163 ], 164 "startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Required. Start date of the range (inclusive). 165 "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 166 "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 167 "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 168 }, 169 "totalMatchedRows": "A String", # The total number of rows matched by the report request. 170 "totals": { # Row representation. # The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. 171 "cells": [ # Cells in the row. 172 { # Cell representation. 173 "value": "A String", # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers. 174 }, 175 ], 176 }, 177 "warnings": [ # Any warnings associated with generation of the report. These warnings are always returned in English. 178 "A String", 179 ], 180}</pre> 181</div> 182 183<div class="method"> 184 <code class="details" id="generateCsv">generateCsv(name, currencyCode=None, dateRange=None, endDate_day=None, endDate_month=None, endDate_year=None, languageCode=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code> 185 <pre>Generates a csv formatted saved report. 186 187Args: 188 name: string, Required. Name of the saved report. Format: accounts/{account}/reports/{report} (required) 189 currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set. 190 dateRange: string, Date range of the report, if unset the range will be considered CUSTOM. 191 Allowed values 192 REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range. 193 CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided. 194 TODAY - Current day. 195 YESTERDAY - Yesterday. 196 MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12]. 197 YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12]. 198 LAST_7_DAYS - Last 7 days, excluding current day. 199 LAST_30_DAYS - Last 30 days, excluding current day. 200 endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 201 endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 202 endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 203 languageCode: string, The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag). 204 reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725). 205 Allowed values 206 REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone. 207 ACCOUNT_TIME_ZONE - Use the account timezone in the report. 208 GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles). 209 startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. 210 startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. 211 startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. 212 x__xgafv: string, V1 error format. 213 Allowed values 214 1 - v1 error format 215 2 - v2 error format 216 217Returns: 218 An object of the form: 219 220 { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. 221 "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. 222 "data": "A String", # The HTTP request/response body as raw binary. 223 "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. 224 { 225 "a_key": "", # Properties of the object. Contains field @type with type URL. 226 }, 227 ], 228}</pre> 229</div> 230 231<div class="method"> 232 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 233 <pre>Lists saved reports. 234 235Args: 236 parent: string, Required. The account which owns the collection of reports. Format: accounts/{account} (required) 237 pageSize: integer, The maximum number of reports to include in the response, used for paging. If unspecified, at most 10000 reports will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000. 238 pageToken: string, A page token, received from a previous `ListPayments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPayments` must match the call that provided the page token. 239 x__xgafv: string, V1 error format. 240 Allowed values 241 1 - v1 error format 242 2 - v2 error format 243 244Returns: 245 An object of the form: 246 247 { # Response definition for the saved reports list rpc. 248 "nextPageToken": "A String", # Continuation token used to page through reports. To retrieve the next page of the results, set the next request's "page_token" value to this. 249 "savedReports": [ # The reports returned in this list response. 250 { # Representation of a saved report. 251 "name": "A String", # Resource name of the report. Format: accounts/{account}/reports/{report} 252 "title": "A String", # Report title as specified by publisher. 253 }, 254 ], 255}</pre> 256</div> 257 258<div class="method"> 259 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 260 <pre>Retrieves the next page of results. 261 262Args: 263 previous_request: The request for the previous page. (required) 264 previous_response: The response from the request for the previous page. (required) 265 266Returns: 267 A request object that you can call 'execute()' on to request the next 268 page. Returns None if there are no more items in the collection. 269 </pre> 270</div> 271 272</body></html>