Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05662cf

Browse files
feat: add minute_ranges field to RunRealtimeReportRequest object (#101)
...which can be used to specify the time range (in minutes) for realtime report queries PiperOrigin-RevId: 383930639 Source-Link: googleapis/googleapis@41b50a3 Source-Link: googleapis/googleapis-gen@08ed64b docs: document the increase of the number of allowed dimensions in a report query
1 parent d5a3f66 commit 05662cf

File tree

5 files changed

+62
-1
lines changed

5 files changed

+62
-1
lines changed

packages/google-analytics-data/google/analytics/data/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from google.analytics.data_v1beta.types.data import MetricHeader
6161
from google.analytics.data_v1beta.types.data import MetricMetadata
6262
from google.analytics.data_v1beta.types.data import MetricValue
63+
from google.analytics.data_v1beta.types.data import MinuteRange
6364
from google.analytics.data_v1beta.types.data import NumericValue
6465
from google.analytics.data_v1beta.types.data import OrderBy
6566
from google.analytics.data_v1beta.types.data import Pivot
@@ -104,6 +105,7 @@
104105
"MetricHeader",
105106
"MetricMetadata",
106107
"MetricValue",
108+
"MinuteRange",
107109
"NumericValue",
108110
"OrderBy",
109111
"Pivot",

packages/google-analytics-data/google/analytics/data_v1beta/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from .types.data import MetricHeader
4747
from .types.data import MetricMetadata
4848
from .types.data import MetricValue
49+
from .types.data import MinuteRange
4950
from .types.data import NumericValue
5051
from .types.data import OrderBy
5152
from .types.data import Pivot
@@ -86,6 +87,7 @@
8687
"MetricMetadata",
8788
"MetricType",
8889
"MetricValue",
90+
"MinuteRange",
8991
"NumericValue",
9092
"OrderBy",
9193
"Pivot",

packages/google-analytics-data/google/analytics/data_v1beta/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
MetricHeader,
4646
MetricMetadata,
4747
MetricValue,
48+
MinuteRange,
4849
NumericValue,
4950
OrderBy,
5051
Pivot,
@@ -88,6 +89,7 @@
8889
"MetricHeader",
8990
"MetricMetadata",
9091
"MetricValue",
92+
"MinuteRange",
9193
"NumericValue",
9294
"OrderBy",
9395
"Pivot",

packages/google-analytics-data/google/analytics/data_v1beta/types/analytics_data_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,15 @@ class RunRealtimeReportRequest(proto.Message):
547547
Toggles whether to return the current state of this
548548
Analytics Property's Realtime quota. Quota is returned in
549549
`PropertyQuota <#PropertyQuota>`__.
550+
minute_ranges (Sequence[google.analytics.data_v1beta.types.MinuteRange]):
551+
The minute ranges of event data to read. If
552+
unspecified, one minute range for the last 30
553+
minutes will be used. If multiple minute ranges
554+
are requested, each response row will contain a
555+
zero based minute range index. If two minute
556+
ranges overlap, the event data for the
557+
overlapping minutes is included in the response
558+
rows for both minute ranges.
550559
"""
551560

552561
property = proto.Field(proto.STRING, number=1,)
@@ -562,6 +571,9 @@ class RunRealtimeReportRequest(proto.Message):
562571
)
563572
order_bys = proto.RepeatedField(proto.MESSAGE, number=8, message=data.OrderBy,)
564573
return_property_quota = proto.Field(proto.BOOL, number=9,)
574+
minute_ranges = proto.RepeatedField(
575+
proto.MESSAGE, number=10, message=data.MinuteRange,
576+
)
565577

566578

567579
class RunRealtimeReportResponse(proto.Message):

packages/google-analytics-data/google/analytics/data_v1beta/types/data.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"MetricAggregation",
2323
"MetricType",
2424
"DateRange",
25+
"MinuteRange",
2526
"Dimension",
2627
"DimensionExpression",
2728
"Metric",
@@ -107,12 +108,54 @@ class DateRange(proto.Message):
107108
name = proto.Field(proto.STRING, number=3,)
108109

109110

111+
class MinuteRange(proto.Message):
112+
r"""A contiguous set of minutes: startMinutesAgo, startMinutesAgo
113+
+ 1, ..., endMinutesAgo. Requests are allowed up to 2 minute
114+
ranges.
115+
116+
Attributes:
117+
start_minutes_ago (int):
118+
The inclusive start minute for the query as a number of
119+
minutes before now. For example, ``"startMinutesAgo": 29``
120+
specifies the report should include event data from 29
121+
minutes ago and after. Cannot be after ``endMinutesAgo``.
122+
123+
If unspecified, ``startMinutesAgo`` is defaulted to 29.
124+
Standard Analytics properties can request up to the last 30
125+
minutes of event data (``startMinutesAgo <= 29``), and 360
126+
Analytics properties can request up to the last 60 minutes
127+
of event data (``startMinutesAgo <= 59``).
128+
end_minutes_ago (int):
129+
The inclusive end minute for the query as a number of
130+
minutes before now. Cannot be before ``startMinutesAgo``.
131+
For example, ``"endMinutesAgo": 15`` specifies the report
132+
should include event data from prior to 15 minutes ago.
133+
134+
If unspecified, ``endMinutesAgo`` is defaulted to 0.
135+
Standard Analytics properties can request any minute in the
136+
last 30 minutes of event data (``endMinutesAgo <= 29``), and
137+
360 Analytics properties can request any minute in the last
138+
60 minutes of event data (``endMinutesAgo <= 59``).
139+
name (str):
140+
Assigns a name to this minute range. The dimension
141+
``dateRange`` is valued to this name in a report response.
142+
If set, cannot begin with ``date_range_`` or ``RESERVED_``.
143+
If not set, minute ranges are named by their zero based
144+
index in the request: ``date_range_0``, ``date_range_1``,
145+
etc.
146+
"""
147+
148+
start_minutes_ago = proto.Field(proto.INT32, number=1, optional=True,)
149+
end_minutes_ago = proto.Field(proto.INT32, number=2, optional=True,)
150+
name = proto.Field(proto.STRING, number=3,)
151+
152+
110153
class Dimension(proto.Message):
111154
r"""Dimensions are attributes of your data. For example, the
112155
dimension city indicates the city from which an event
113156
originates. Dimension values in report responses are strings;
114157
for example, city could be "Paris" or "New York". Requests are
115-
allowed up to 8 dimensions.
158+
allowed up to 9 dimensions.
116159
117160
Attributes:
118161
name (str):

0 commit comments

Comments
 (0)