blob: ed41cd5740f3f968dd2d4c3a2e0d75f18485f22b [file] [log] [blame]
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001<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="admob_v1beta.html">AdMob API</a> . <a href="admob_v1beta.accounts.html">accounts</a> . <a href="admob_v1beta.accounts.mediationReport.html">mediationReport</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 an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.</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 an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.
92
93Args:
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 an AdMob Mediation report.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080099 &quot;reportSpec&quot;: { # The specification for generating an AdMob Mediation report. For example, the specification to get observed ECPM sliced by ad source and app for the &#x27;US&#x27; and &#x27;CN&#x27; countries can look like the following example: { &quot;date_range&quot;: { &quot;start_date&quot;: {&quot;year&quot;: 2018, &quot;month&quot;: 9, &quot;day&quot;: 1}, &quot;end_date&quot;: {&quot;year&quot;: 2018, &quot;month&quot;: 9, &quot;day&quot;: 30} }, &quot;dimensions&quot;: [&quot;AD_SOURCE&quot;, &quot;APP&quot;, &quot;COUNTRY&quot;], &quot;metrics&quot;: [&quot;OBSERVED_ECPM&quot;], &quot;dimension_filters&quot;: [ { &quot;dimension&quot;: &quot;COUNTRY&quot;, &quot;matches_any&quot;: {&quot;values&quot;: [{&quot;value&quot;: &quot;US&quot;, &quot;value&quot;: &quot;CN&quot;}]} } ], &quot;sort_conditions&quot;: [ {&quot;dimension&quot;:&quot;APP&quot;, order: &quot;ASCENDING&quot;} ], &quot;localization_settings&quot;: { &quot;currency_code&quot;: &quot;USD&quot;, &quot;language_code&quot;: &quot;en-US&quot; } } For a better understanding, you can treat the preceding specification like the following pseudo SQL: SELECT AD_SOURCE, APP, COUNTRY, OBSERVED_ECPM FROM MEDIATION_REPORT WHERE DATE &gt;= &#x27;2018-09-01&#x27; AND DATE &lt;= &#x27;2018-09-30&#x27; AND COUNTRY IN (&#x27;US&#x27;, &#x27;CN&#x27;) GROUP BY AD_SOURCE, APP, COUNTRY ORDER BY APP ASC; # Network report specification.
100 &quot;dateRange&quot;: { # Specification of a single date range. Both dates are inclusive. # The date range for which the report is generated.
101 &quot;endDate&quot;: { # 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`. # End date of the date range, inclusive. Must be greater than or equal to the start date.
102 &quot;day&quot;: 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&#x27;t significant.
103 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
104 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800105 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800106 &quot;startDate&quot;: { # 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`. # Start date of the date range, inclusive. Must be less than or equal to the end date.
107 &quot;day&quot;: 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&#x27;t significant.
108 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
109 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800110 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700111 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800112 &quot;dimensionFilters&quot;: [ # Describes which report rows to match based on their dimension values.
113 { # Describes which report rows to match based on their dimension values.
114 &quot;dimension&quot;: &quot;A String&quot;, # Applies the filter criterion to the specified dimension.
115 &quot;matchesAny&quot;: { # List of string values. # Matches a row if its value for the specified dimension is in one of the values specified in this condition.
116 &quot;values&quot;: [ # The string values.
117 &quot;A String&quot;,
118 ],
119 },
120 },
121 ],
122 &quot;dimensions&quot;: [ # 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.
123 &quot;A String&quot;,
124 ],
125 &quot;localizationSettings&quot;: { # Localization settings for reports, such as currency and language. It affects how metrics are calculated. # Localization settings of the report.
126 &quot;currencyCode&quot;: &quot;A String&quot;, # Currency code of the earning related metrics, which is the 3-letter code defined in ISO 4217. The daily average rate is used for the currency conversion. Defaults to the account currency code if unspecified.
127 &quot;languageCode&quot;: &quot;A String&quot;, # Language used for any localized text, such as some dimension value display labels. The language tag defined in the IETF BCP47. Defaults to &#x27;en-US&#x27; if unspecified.
128 },
129 &quot;maxReportRows&quot;: 42, # Maximum number of report data rows to return. If the value is not set, the API returns as many rows as possible, up to 100000. Acceptable values are 1-100000, inclusive. Values larger than 100000 return an error.
130 &quot;metrics&quot;: [ # List of metrics of the report. A report must specify at least one metric.
131 &quot;A String&quot;,
132 ],
133 &quot;sortConditions&quot;: [ # Describes the sorting of report rows. The order of the condition in the list defines its precedence; the earlier the condition, the higher its precedence. If no sort conditions are specified, the row ordering is undefined.
134 { # Sorting direction to be applied on a dimension or a metric.
135 &quot;dimension&quot;: &quot;A String&quot;, # Sort by the specified dimension.
136 &quot;metric&quot;: &quot;A String&quot;, # Sort by the specified metric.
137 &quot;order&quot;: &quot;A String&quot;, # Sorting order of the dimension or metric.
138 },
139 ],
140 &quot;timeZone&quot;: &quot;A String&quot;, # A report time zone. Accepts an IANA TZ name values, such as &quot;America/Los_Angeles.&quot; If no time zone is defined, the account default takes effect. Check default value by the get account action. **Warning:** The &quot;America/Los_Angeles&quot; is the only supported value at the moment.
141 },
142}
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700143
144 x__xgafv: string, V1 error format.
145 Allowed values
146 1 - v1 error format
147 2 - v2 error format
148
149Returns:
150 An object of the form:
151
152 { # The streaming response for the AdMob Mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ &quot;header&quot;: { &quot;date_range&quot;: { &quot;start_date&quot;: {&quot;year&quot;: 2018, &quot;month&quot;: 9, &quot;day&quot;: 1}, &quot;end_date&quot;: {&quot;year&quot;: 2018, &quot;month&quot;: 9, &quot;day&quot;: 1} }, &quot;localization_settings&quot;: { &quot;currency_code&quot;: &quot;USD&quot;, &quot;language_code&quot;: &quot;en-US&quot; } } }, { &quot;row&quot;: { &quot;dimension_values&quot;: { &quot;DATE&quot;: {&quot;value&quot;: &quot;20180918&quot;}, &quot;APP&quot;: { &quot;value&quot;: &quot;ca-app-pub-8123415297019784~1001342552&quot;, &quot;display_label&quot;: &quot;My app name!&quot; } }, &quot;metric_values&quot;: { &quot;ESTIMATED_EARNINGS&quot;: {&quot;decimal_value&quot;: &quot;1324746&quot;} } } }, { &quot;footer&quot;: {&quot;matching_row_count&quot;: 1} }]
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800153 &quot;footer&quot;: { # Groups data available after report generation, for example, warnings and row counts. Always sent as the last message in the stream response. # Additional information about the generated report, such as warnings about the data.
154 &quot;matchingRowCount&quot;: &quot;A String&quot;, # Total number of rows that matched the request. Warning: This count does NOT always match the number of rows in the response. Do not make that assumption when processing the response.
155 &quot;warnings&quot;: [ # Warnings associated with generation of the report.
156 { # Warnings associated with generation of the report.
157 &quot;description&quot;: &quot;A String&quot;, # Describes the details of the warning message, in English.
158 &quot;type&quot;: &quot;A String&quot;, # Type of the warning.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800159 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800160 ],
161 },
162 &quot;header&quot;: { # Groups data helps to treat the generated report. Always sent as a first message in the stream response. # Report generation settings that describes the report contents, such as the report date range and localization settings.
163 &quot;dateRange&quot;: { # Specification of a single date range. Both dates are inclusive. # The date range for which the report is generated. This is identical to the range specified in the report request.
164 &quot;endDate&quot;: { # 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`. # End date of the date range, inclusive. Must be greater than or equal to the start date.
165 &quot;day&quot;: 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&#x27;t significant.
166 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
167 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700168 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800169 &quot;startDate&quot;: { # 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`. # Start date of the date range, inclusive. Must be less than or equal to the end date.
170 &quot;day&quot;: 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&#x27;t significant.
171 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
172 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800173 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700174 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800175 &quot;localizationSettings&quot;: { # Localization settings for reports, such as currency and language. It affects how metrics are calculated. # Localization settings of the report. This is identical to the settings in the report request.
176 &quot;currencyCode&quot;: &quot;A String&quot;, # Currency code of the earning related metrics, which is the 3-letter code defined in ISO 4217. The daily average rate is used for the currency conversion. Defaults to the account currency code if unspecified.
177 &quot;languageCode&quot;: &quot;A String&quot;, # Language used for any localized text, such as some dimension value display labels. The language tag defined in the IETF BCP47. Defaults to &#x27;en-US&#x27; if unspecified.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800178 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800179 &quot;reportingTimeZone&quot;: &quot;A String&quot;, # The report time zone. The value is a time-zone ID as specified by the CLDR project, for example, &quot;America/Los_Angeles&quot;.
180 },
181 &quot;row&quot;: { # A row of the returning report. # Actual report data.
182 &quot;dimensionValues&quot;: { # Map of dimension values in a row, with keys as enum name of the dimensions.
183 &quot;a_key&quot;: { # Representation of a dimension value.
184 &quot;displayLabel&quot;: &quot;A String&quot;, # The localized string representation of the value. If unspecified, the display label should be derived from the value.
185 &quot;value&quot;: &quot;A String&quot;, # Dimension value in the format specified in the report&#x27;s spec Dimension enum.
186 },
187 },
188 &quot;metricValues&quot;: { # 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.
189 &quot;a_key&quot;: { # Representation of a metric value.
190 &quot;doubleValue&quot;: 3.14, # Double precision (approximate) decimal values. Rates are from 0 to 1.
191 &quot;integerValue&quot;: &quot;A String&quot;, # Metric integer value.
192 &quot;microsValue&quot;: &quot;A String&quot;, # 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.
193 },
194 },
195 },
196}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700197</div>
198
199</body></html>