| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, 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 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, 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="admob_v1beta.html">AdMob API</a> . <a href="admob_v1beta.accounts.html">accounts</a> . <a href="admob_v1beta.accounts.campaignReport.html">campaignReport</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(parent, body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Generates Campaign Report based on provided specifications.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="close">close()</code> |
| 86 |
<pre>Close httplib2 connections.</pre> |
| 87 |
</div> |
| 88 |
|
| 89 |
<div class="method"> |
| 90 |
<code class="details" id="generate">generate(parent, body=None, x__xgafv=None)</code> |
| 91 |
<pre>Generates Campaign Report based on provided specifications. |
| 92 |
|
| 93 |
Args: |
| 94 |
parent: string, Resource name of the account to generate the report for. Example: accounts/pub-9876543210987654 (required) |
| 95 |
body: object, The request body. |
| 96 |
The object takes the form of: |
| 97 |
|
| 98 |
{ # Request to generate campaign report. |
| 99 |
"reportSpec": { # The specification for generating a Campaign report. For example, the specification to get IMPRESSIONS and CLICKS sliced by CAMPAIGN_ID can look like the following example: { "date_range": { "start_date": {"year": 2021, "month": 12, "day": 1}, "end_date": {"year": 2021, "month": 12, "day": 30} }, "dimensions": ["CAMPAIGN_ID"], "metrics": ["IMPRESSIONS", "CLICKS"], } # Campaign report specification. |
| 100 |
"dateRange": { # Specification of a single date range. Both dates are inclusive. # The date range for which the report is generated. The max range is 30 days. |
| 101 |
"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, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # End date of the date range, inclusive. Must be greater than or equal to the start date. |
| 102 |
"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. |
| 103 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 104 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 105 |
}, |
| 106 |
"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, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Start date of the date range, inclusive. Must be less than or equal to the end date. |
| 107 |
"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. |
| 108 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 109 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 110 |
}, |
| 111 |
}, |
| 112 |
"dimensions": [ # List of dimensions of the report. The value combination of these dimensions determines the row of the report. If no dimensions are specified, the report returns a single row of requested metrics for the entire account. |
| 113 |
"A String", |
| 114 |
], |
| 115 |
"languageCode": "A String", # Language used for any localized text, such as certain applicable dimension values. The language tag is defined in the IETF BCP47. Defaults to 'en-US' if unspecified or invalid. |
| 116 |
"metrics": [ # List of metrics of the report. A report must specify at least one metric. |
| 117 |
"A String", |
| 118 |
], |
| 119 |
}, |
| 120 |
} |
| 121 |
|
| 122 |
x__xgafv: string, V1 error format. |
| 123 |
Allowed values |
| 124 |
1 - v1 error format |
| 125 |
2 - v2 error format |
| 126 |
|
| 127 |
Returns: |
| 128 |
An object of the form: |
| 129 |
|
| 130 |
{ # Campaign Report API response. |
| 131 |
"rows": [ # The campaign report data from the specified publisher. At most 100000 rows will be returned from the API. |
| 132 |
{ # A row of the returning report. |
| 133 |
"dimensionValues": { # Map of dimension values in a row, with keys as enum name of the dimensions. |
| 134 |
"a_key": { # Representation of a dimension value. |
| 135 |
"displayLabel": "A String", # The localized string representation of the value. If unspecified, the display label should be derived from the value. |
| 136 |
"value": "A String", # Dimension value in the format specified in the report's spec Dimension enum. |
| 137 |
}, |
| 138 |
}, |
| 139 |
"metricValues": { # Map of metric values in a row, with keys as enum name of the metrics. If a metric being requested has no value returned, the map will not include it. |
| 140 |
"a_key": { # Representation of a metric value. |
| 141 |
"doubleValue": 3.14, # Double precision (approximate) decimal values. Rates are from 0 to 1. |
| 142 |
"integerValue": "A String", # Metric integer value. |
| 143 |
"microsValue": "A String", # Amount in micros. One million is equivalent to one unit. Currency value is in the unit (USD, EUR or other) specified by the request. For example, $6.50 whould be represented as 6500000 micros. |
| 144 |
}, |
| 145 |
}, |
| 146 |
}, |
| 147 |
], |
| 148 |
}</pre> |
| 149 |
</div> |
| 150 |
|
| 151 |
</body></html> |