Retail V2 API - Class Google::Cloud::Retail::V2::AnalyticsService::Rest::Client (v2.6.1)
Stay organized with collections
Save and categorize content based on your preferences.
Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::AnalyticsService::Rest::Client.
REST client for the AnalyticsService service.
Service for managing & accessing retail search business metric. Retail recommendation business metric is currently not available.
Inherits
- Object
Methods
.configure
defself.configure(){|config|...}->Client::ConfigurationConfigure the AnalyticsService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AnalyticsService clients ::Google::Cloud::Retail::V2::AnalyticsService::Rest::Client.configuredo|config| config.timeout=10.0 end
#configure
defconfigure(){|config|...}->Client::ConfigurationConfigure the AnalyticsService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure .
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#export_analytics_metrics
defexport_analytics_metrics(request,options=nil)->::Gapic::Operation
defexport_analytics_metrics(catalog:nil,output_config:nil,filter:nil)->::Gapic::OperationExports analytics metrics.
Operation.response is of type ExportAnalyticsMetricsResponse.
Operation.metadata is of type ExportMetadata.
defexport_analytics_metrics(request,options=nil)->::Gapic::Operationexport_analytics_metrics via a request object, either of type
ExportAnalyticsMetricsRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::ExportAnalyticsMetricsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
defexport_analytics_metrics(catalog:nil,output_config:nil,filter:nil)->::Gapic::Operationexport_analytics_metrics via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
catalog (::String) — Required. Full resource name of the parent catalog.
Expected format:
projects/*/locations/*/catalogs/* - output_config (::Google::Cloud::Retail::V2::OutputConfig, ::Hash) — Required. The output location of the data.
-
filter (::String) —
A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range.
Currently we expect only one types of fields:
timestamp: This can be specified twice, once with a less than operator and once with a greater than operator. Thetimestamprestriction should result in one, contiguous, valid,timestamprange.
Some examples of valid filters expressions:
- Example 1:
timestamp > "2012年04月23日T18:25:43.511Z" timestamp < "2012年04月23日T18:30:43.511Z" - Example 2:
timestamp > "2012年04月23日T18:25:43.511Z"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require"google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client=Google::Cloud::Retail::V2::AnalyticsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request=Google::Cloud::Retail::V2::ExportAnalyticsMetricsRequest.new # Call the export_analytics_metrics method. result=client.export_analytics_metricsrequest # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done!timeout:60 ifresult.response? presult.response else puts"No response received." end
#initialize
definitialize(){|config|...}->ClientCreate a new AnalyticsService REST client object.
- (config) — Configure the AnalyticsService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client=::Google::Cloud::Retail::V2::AnalyticsService::Rest::Client.new # Create a client using a custom configuration client=::Google::Cloud::Retail::V2::AnalyticsService::Rest::Client.newdo|config| config.timeout=10.0 end
#location_client
deflocation_client()->Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
deflogger()->LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
defoperations_client()->::Google::Cloud::Retail::V2::AnalyticsService::Rest::OperationsGet the associated client for long-running operations.
#universe_domain
defuniverse_domain()->StringThe effective universe domain
- (String)