google-analytics-data-v1beta 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/analytics/data/v1beta/analytics_data/client.rb +29 -12
- data/lib/google/analytics/data/v1beta/analytics_data/operations.rb +9 -5
- data/lib/google/analytics/data/v1beta/analytics_data/rest/client.rb +29 -12
- data/lib/google/analytics/data/v1beta/analytics_data/rest/operations.rb +40 -28
- data/lib/google/analytics/data/v1beta/analytics_data/rest/service_stub.rb +102 -68
- data/lib/google/analytics/data/v1beta/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ad671716cd7ce9e1da68e17b827923a556fac9d949ed2e2056926bafdc767ad
|
4
|
+
data.tar.gz: d64ed75c83d62ebdf0f1b0c61283ba60a1f8760d2dd4cd3fa41df28f23bffbc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d4ea3da1da23b51e96a8b7d26154e1e63fad8c33b7b04e698f80ef56134ba013e08bb8ec0610d154cc9330bd372d5a83f95d9b43ada91b0369cb76529c8984
|
7
|
+
data.tar.gz: 4139e7a671417fa6c263474e6ce72ab14174979f0fce188e2fd79dce97e26fa3c95e3dc8f30e6aac3ac44ea9f8e41bbd798cdfd004ecec205e718e93e4767a86
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://developers.google.com/analytics/devguides/reporting/data/v1)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/analytics/data/v1beta"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -183,8 +183,19 @@ module Google
|
|
183
183
|
universe_domain: @config.universe_domain,
|
184
184
|
channel_args: @config.channel_args,
|
185
185
|
interceptors: @config.interceptors,
|
186
|
-
channel_pool_config: @config.channel_pool
|
186
|
+
channel_pool_config: @config.channel_pool,
|
187
|
+
logger: @config.logger
|
187
188
|
)
|
189
|
+
|
190
|
+
@analytics_data_stub.stub_logger&.info do |entry|
|
191
|
+
entry.set_system_name
|
192
|
+
entry.set_service
|
193
|
+
entry.message = "Created client for #{entry.service}"
|
194
|
+
entry.set_credentials_fields credentials
|
195
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
196
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
197
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
198
|
+
end
|
188
199
|
end
|
189
200
|
|
190
201
|
##
|
@@ -194,6 +205,15 @@ module Google
|
|
194
205
|
#
|
195
206
|
attr_reader :operations_client
|
196
207
|
|
208
|
+
##
|
209
|
+
# The logger used for request/response debug logging.
|
210
|
+
#
|
211
|
+
# @return [Logger]
|
212
|
+
#
|
213
|
+
def logger
|
214
|
+
@analytics_data_stub.logger
|
215
|
+
end
|
216
|
+
|
197
217
|
# Service calls
|
198
218
|
|
199
219
|
##
|
@@ -367,7 +387,6 @@ module Google
|
|
367
387
|
|
368
388
|
@analytics_data_stub.call_rpc :run_report, request, options: options do |response, operation|
|
369
389
|
yield response, operation if block_given?
|
370
|
-
return response
|
371
390
|
end
|
372
391
|
rescue ::GRPC::BadStatus => e
|
373
392
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -513,7 +532,6 @@ module Google
|
|
513
532
|
|
514
533
|
@analytics_data_stub.call_rpc :run_pivot_report, request, options: options do |response, operation|
|
515
534
|
yield response, operation if block_given?
|
516
|
-
return response
|
517
535
|
end
|
518
536
|
rescue ::GRPC::BadStatus => e
|
519
537
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -611,7 +629,6 @@ module Google
|
|
611
629
|
|
612
630
|
@analytics_data_stub.call_rpc :batch_run_reports, request, options: options do |response, operation|
|
613
631
|
yield response, operation if block_given?
|
614
|
-
return response
|
615
632
|
end
|
616
633
|
rescue ::GRPC::BadStatus => e
|
617
634
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -709,7 +726,6 @@ module Google
|
|
709
726
|
|
710
727
|
@analytics_data_stub.call_rpc :batch_run_pivot_reports, request, options: options do |response, operation|
|
711
728
|
yield response, operation if block_given?
|
712
|
-
return response
|
713
729
|
end
|
714
730
|
rescue ::GRPC::BadStatus => e
|
715
731
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -814,7 +830,6 @@ module Google
|
|
814
830
|
|
815
831
|
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
816
832
|
yield response, operation if block_given?
|
817
|
-
return response
|
818
833
|
end
|
819
834
|
rescue ::GRPC::BadStatus => e
|
820
835
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -947,7 +962,6 @@ module Google
|
|
947
962
|
|
948
963
|
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
949
964
|
yield response, operation if block_given?
|
950
|
-
return response
|
951
965
|
end
|
952
966
|
rescue ::GRPC::BadStatus => e
|
953
967
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1063,7 +1077,6 @@ module Google
|
|
1063
1077
|
|
1064
1078
|
@analytics_data_stub.call_rpc :check_compatibility, request, options: options do |response, operation|
|
1065
1079
|
yield response, operation if block_given?
|
1066
|
-
return response
|
1067
1080
|
end
|
1068
1081
|
rescue ::GRPC::BadStatus => e
|
1069
1082
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1184,7 +1197,7 @@ module Google
|
|
1184
1197
|
@analytics_data_stub.call_rpc :create_audience_export, request, options: options do |response, operation|
|
1185
1198
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1186
1199
|
yield response, operation if block_given?
|
1187
|
-
|
1200
|
+
throw :response, response
|
1188
1201
|
end
|
1189
1202
|
rescue ::GRPC::BadStatus => e
|
1190
1203
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1310,7 +1323,6 @@ module Google
|
|
1310
1323
|
|
1311
1324
|
@analytics_data_stub.call_rpc :query_audience_export, request, options: options do |response, operation|
|
1312
1325
|
yield response, operation if block_given?
|
1313
|
-
return response
|
1314
1326
|
end
|
1315
1327
|
rescue ::GRPC::BadStatus => e
|
1316
1328
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1408,7 +1420,6 @@ module Google
|
|
1408
1420
|
|
1409
1421
|
@analytics_data_stub.call_rpc :get_audience_export, request, options: options do |response, operation|
|
1410
1422
|
yield response, operation if block_given?
|
1411
|
-
return response
|
1412
1423
|
end
|
1413
1424
|
rescue ::GRPC::BadStatus => e
|
1414
1425
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1525,7 +1536,7 @@ module Google
|
|
1525
1536
|
@analytics_data_stub.call_rpc :list_audience_exports, request, options: options do |response, operation|
|
1526
1537
|
response = ::Gapic::PagedEnumerable.new @analytics_data_stub, :list_audience_exports, request, response, operation, options
|
1527
1538
|
yield response, operation if block_given?
|
1528
|
-
|
1539
|
+
throw :response, response
|
1529
1540
|
end
|
1530
1541
|
rescue ::GRPC::BadStatus => e
|
1531
1542
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1614,6 +1625,11 @@ module Google
|
|
1614
1625
|
# default endpoint URL. The default value of nil uses the environment
|
1615
1626
|
# universe (usually the default "googleapis.com" universe).
|
1616
1627
|
# @return [::String,nil]
|
1628
|
+
# @!attribute [rw] logger
|
1629
|
+
# A custom logger to use for request/response debug logging, or the value
|
1630
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1631
|
+
# explicitly disable logging.
|
1632
|
+
# @return [::Logger,:default,nil]
|
1617
1633
|
#
|
1618
1634
|
class Configuration
|
1619
1635
|
extend ::Gapic::Config
|
@@ -1638,6 +1654,7 @@ module Google
|
|
1638
1654
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1639
1655
|
config_attr :quota_project, nil, ::String, nil
|
1640
1656
|
config_attr :universe_domain, nil, ::String, nil
|
1657
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1641
1658
|
|
1642
1659
|
# @private
|
1643
1660
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +590,7 @@ module Google
|
|
592
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
593
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
594
592
|
yield response, operation if block_given?
|
595
|
-
|
593
|
+
throw :response, response
|
596
594
|
end
|
597
595
|
rescue ::GRPC::BadStatus => e
|
598
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -681,6 +679,11 @@ module Google
|
|
681
679
|
# default endpoint URL. The default value of nil uses the environment
|
682
680
|
# universe (usually the default "googleapis.com" universe).
|
683
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
684
687
|
#
|
685
688
|
class Configuration
|
686
689
|
extend ::Gapic::Config
|
@@ -705,6 +708,7 @@ module Google
|
|
705
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
709
|
config_attr :quota_project, nil, ::String, nil
|
707
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
708
712
|
|
709
713
|
# @private
|
710
714
|
def initialize parent_config = nil
|
@@ -176,8 +176,19 @@ module Google
|
|
176
176
|
endpoint: @config.endpoint,
|
177
177
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
178
178
|
universe_domain: @config.universe_domain,
|
179
|
-
credentials: credentials
|
179
|
+
credentials: credentials,
|
180
|
+
logger: @config.logger
|
180
181
|
)
|
182
|
+
|
183
|
+
@analytics_data_stub.logger(stub: true)&.info do |entry|
|
184
|
+
entry.set_system_name
|
185
|
+
entry.set_service
|
186
|
+
entry.message = "Created client for #{entry.service}"
|
187
|
+
entry.set_credentials_fields credentials
|
188
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
189
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
190
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
191
|
+
end
|
181
192
|
end
|
182
193
|
|
183
194
|
##
|
@@ -187,6 +198,15 @@ module Google
|
|
187
198
|
#
|
188
199
|
attr_reader :operations_client
|
189
200
|
|
201
|
+
##
|
202
|
+
# The logger used for request/response debug logging.
|
203
|
+
#
|
204
|
+
# @return [Logger]
|
205
|
+
#
|
206
|
+
def logger
|
207
|
+
@analytics_data_stub.logger
|
208
|
+
end
|
209
|
+
|
190
210
|
# Service calls
|
191
211
|
|
192
212
|
##
|
@@ -353,7 +373,6 @@ module Google
|
|
353
373
|
|
354
374
|
@analytics_data_stub.run_report request, options do |result, operation|
|
355
375
|
yield result, operation if block_given?
|
356
|
-
return result
|
357
376
|
end
|
358
377
|
rescue ::Gapic::Rest::Error => e
|
359
378
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -492,7 +511,6 @@ module Google
|
|
492
511
|
|
493
512
|
@analytics_data_stub.run_pivot_report request, options do |result, operation|
|
494
513
|
yield result, operation if block_given?
|
495
|
-
return result
|
496
514
|
end
|
497
515
|
rescue ::Gapic::Rest::Error => e
|
498
516
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -583,7 +601,6 @@ module Google
|
|
583
601
|
|
584
602
|
@analytics_data_stub.batch_run_reports request, options do |result, operation|
|
585
603
|
yield result, operation if block_given?
|
586
|
-
return result
|
587
604
|
end
|
588
605
|
rescue ::Gapic::Rest::Error => e
|
589
606
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -674,7 +691,6 @@ module Google
|
|
674
691
|
|
675
692
|
@analytics_data_stub.batch_run_pivot_reports request, options do |result, operation|
|
676
693
|
yield result, operation if block_given?
|
677
|
-
return result
|
678
694
|
end
|
679
695
|
rescue ::Gapic::Rest::Error => e
|
680
696
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -772,7 +788,6 @@ module Google
|
|
772
788
|
|
773
789
|
@analytics_data_stub.get_metadata request, options do |result, operation|
|
774
790
|
yield result, operation if block_given?
|
775
|
-
return result
|
776
791
|
end
|
777
792
|
rescue ::Gapic::Rest::Error => e
|
778
793
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -898,7 +913,6 @@ module Google
|
|
898
913
|
|
899
914
|
@analytics_data_stub.run_realtime_report request, options do |result, operation|
|
900
915
|
yield result, operation if block_given?
|
901
|
-
return result
|
902
916
|
end
|
903
917
|
rescue ::Gapic::Rest::Error => e
|
904
918
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1007,7 +1021,6 @@ module Google
|
|
1007
1021
|
|
1008
1022
|
@analytics_data_stub.check_compatibility request, options do |result, operation|
|
1009
1023
|
yield result, operation if block_given?
|
1010
|
-
return result
|
1011
1024
|
end
|
1012
1025
|
rescue ::Gapic::Rest::Error => e
|
1013
1026
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1121,7 +1134,7 @@ module Google
|
|
1121
1134
|
@analytics_data_stub.create_audience_export request, options do |result, operation|
|
1122
1135
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1123
1136
|
yield result, operation if block_given?
|
1124
|
-
|
1137
|
+
throw :response, result
|
1125
1138
|
end
|
1126
1139
|
rescue ::Gapic::Rest::Error => e
|
1127
1140
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1240,7 +1253,6 @@ module Google
|
|
1240
1253
|
|
1241
1254
|
@analytics_data_stub.query_audience_export request, options do |result, operation|
|
1242
1255
|
yield result, operation if block_given?
|
1243
|
-
return result
|
1244
1256
|
end
|
1245
1257
|
rescue ::Gapic::Rest::Error => e
|
1246
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1331,7 +1343,6 @@ module Google
|
|
1331
1343
|
|
1332
1344
|
@analytics_data_stub.get_audience_export request, options do |result, operation|
|
1333
1345
|
yield result, operation if block_given?
|
1334
|
-
return result
|
1335
1346
|
end
|
1336
1347
|
rescue ::Gapic::Rest::Error => e
|
1337
1348
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1441,7 +1452,7 @@ module Google
|
|
1441
1452
|
@analytics_data_stub.list_audience_exports request, options do |result, operation|
|
1442
1453
|
result = ::Gapic::Rest::PagedEnumerable.new @analytics_data_stub, :list_audience_exports, "audience_exports", request, result, options
|
1443
1454
|
yield result, operation if block_given?
|
1444
|
-
|
1455
|
+
throw :response, result
|
1445
1456
|
end
|
1446
1457
|
rescue ::Gapic::Rest::Error => e
|
1447
1458
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1521,6 +1532,11 @@ module Google
|
|
1521
1532
|
# default endpoint URL. The default value of nil uses the environment
|
1522
1533
|
# universe (usually the default "googleapis.com" universe).
|
1523
1534
|
# @return [::String,nil]
|
1535
|
+
# @!attribute [rw] logger
|
1536
|
+
# A custom logger to use for request/response debug logging, or the value
|
1537
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1538
|
+
# explicitly disable logging.
|
1539
|
+
# @return [::Logger,:default,nil]
|
1524
1540
|
#
|
1525
1541
|
class Configuration
|
1526
1542
|
extend ::Gapic::Config
|
@@ -1542,6 +1558,7 @@ module Google
|
|
1542
1558
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1543
1559
|
config_attr :quota_project, nil, ::String, nil
|
1544
1560
|
config_attr :universe_domain, nil, ::String, nil
|
1561
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1545
1562
|
|
1546
1563
|
# @private
|
1547
1564
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -536,6 +534,11 @@ module Google
|
|
536
534
|
# default endpoint URL. The default value of nil uses the environment
|
537
535
|
# universe (usually the default "googleapis.com" universe).
|
538
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
539
542
|
#
|
540
543
|
class Configuration
|
541
544
|
extend ::Gapic::Config
|
@@ -557,6 +560,7 @@ module Google
|
|
557
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
561
|
config_attr :quota_project, nil, ::String, nil
|
559
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
564
|
|
561
565
|
# @private
|
562
566
|
def initialize parent_config = nil
|
@@ -676,16 +680,18 @@ module Google
|
|
676
680
|
|
677
681
|
response = @client_stub.make_http_request(
|
678
682
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
682
687
|
options: options
|
683
688
|
)
|
684
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
689
695
|
end
|
690
696
|
|
691
697
|
##
|
@@ -714,16 +720,18 @@ module Google
|
|
714
720
|
|
715
721
|
response = @client_stub.make_http_request(
|
716
722
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
720
727
|
options: options
|
721
728
|
)
|
722
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
727
735
|
end
|
728
736
|
|
729
737
|
##
|
@@ -752,16 +760,18 @@ module Google
|
|
752
760
|
|
753
761
|
response = @client_stub.make_http_request(
|
754
762
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
758
767
|
options: options
|
759
768
|
)
|
760
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
765
775
|
end
|
766
776
|
|
767
777
|
##
|
@@ -790,16 +800,18 @@ module Google
|
|
790
800
|
|
791
801
|
response = @client_stub.make_http_request(
|
792
802
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
796
807
|
options: options
|
797
808
|
)
|
798
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
803
815
|
end
|
804
816
|
|
805
817
|
##
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the run_report REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "run_report",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Analytics::Data::V1beta::RunReportResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "run_pivot_report",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Analytics::Data::V1beta::RunPivotReportResponse.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "batch_run_reports",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Analytics::Data::V1beta::BatchRunReportsResponse.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "batch_run_pivot_reports",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Analytics::Data::V1beta::BatchRunPivotReportsResponse.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "get_metadata",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Analytics::Data::V1beta::Metadata.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "run_realtime_report",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Analytics::Data::V1beta::RunRealtimeReportResponse.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "check_compatibility",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Analytics::Data::V1beta::CheckCompatibilityResponse.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "create_audience_export",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|
@@ -391,16 +419,18 @@ module Google
|
|
391
419
|
|
392
420
|
response = @client_stub.make_http_request(
|
393
421
|
verb,
|
394
|
-
uri:
|
395
|
-
body:
|
396
|
-
params:
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "query_audience_export",
|
397
426
|
options: options
|
398
427
|
)
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
400
429
|
result = ::Google::Analytics::Data::V1beta::QueryAudienceExportResponse.decode_json response.body, ignore_unknown_fields: true
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
404
434
|
end
|
405
435
|
|
406
436
|
##
|
@@ -429,16 +459,18 @@ module Google
|
|
429
459
|
|
430
460
|
response = @client_stub.make_http_request(
|
431
461
|
verb,
|
432
|
-
uri:
|
433
|
-
body:
|
434
|
-
params:
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "get_audience_export",
|
435
466
|
options: options
|
436
467
|
)
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
438
469
|
result = ::Google::Analytics::Data::V1beta::AudienceExport.decode_json response.body, ignore_unknown_fields: true
|
439
|
-
|
440
|
-
|
441
|
-
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
442
474
|
end
|
443
475
|
|
444
476
|
##
|
@@ -467,16 +499,18 @@ module Google
|
|
467
499
|
|
468
500
|
response = @client_stub.make_http_request(
|
469
501
|
verb,
|
470
|
-
uri:
|
471
|
-
body:
|
472
|
-
params:
|
502
|
+
uri: uri,
|
503
|
+
body: body || "",
|
504
|
+
params: query_string_params,
|
505
|
+
method_name: "list_audience_exports",
|
473
506
|
options: options
|
474
507
|
)
|
475
508
|
operation = ::Gapic::Rest::TransportOperation.new response
|
476
509
|
result = ::Google::Analytics::Data::V1beta::ListAudienceExportsResponse.decode_json response.body, ignore_unknown_fields: true
|
477
|
-
|
478
|
-
|
479
|
-
|
510
|
+
catch :response do
|
511
|
+
yield result, operation if block_given?
|
512
|
+
result
|
513
|
+
end
|
480
514
|
end
|
481
515
|
|
482
516
|
##
|
@@ -306,9 +306,28 @@ module Google
|
|
306
306
|
# @!attribute [rw] common
|
307
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
308
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
309
319
|
class GoSettings
|
310
320
|
include ::Google::Protobuf::MessageExts
|
311
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
312
331
|
end
|
313
332
|
|
314
333
|
# Describes the generator configuration for a method.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-analytics-data-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.5.
|
109
|
+
rubygems_version: 3.5.23
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: 'Accesses report data in Google Analytics. Warning: Creating multiple Customer
|