Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequest
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
Request proto for SearchText.
Instance Attribute Summary collapse
-
#ev_options ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestEvOptions
Searchable EV options of a place search request.
-
#include_pure_service_area_businesses ⇒ Boolean
(also: #include_pure_service_area_businesses?)
Optional.
-
#included_type ⇒ String
The requested place type.
-
#language_code ⇒ String
Place details will be displayed with the preferred language if available.
-
#location_bias ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationBias
The region to search.
-
#location_restriction ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationRestriction
The region to search.
-
#max_result_count ⇒ Fixnum
Deprecated: Use
page_size
instead. -
#min_rating ⇒ Float
Filter out results whose average user rating is strictly less than this limit.
-
#open_now ⇒ Boolean
(also: #open_now?)
Used to restrict the search to places that are currently open.
-
#page_size ⇒ Fixnum
Optional.
-
#page_token ⇒ String
Optional.
-
#price_levels ⇒ Array<String>
Used to restrict the search to places that are marked as certain price levels.
-
#rank_preference ⇒ String
How results will be ranked in the response.
-
#region_code ⇒ String
The Unicode country/region code (CLDR) of the location where the request is coming from.
-
#routing_parameters ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingParameters
Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.
-
#search_along_route_parameters ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters
Specifies a precalculated polyline from the Routes API defining the route to search.
-
#strict_type_filtering ⇒ Boolean
(also: #strict_type_filtering?)
Used to set strict type filtering for included_type.
-
#text_query ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1SearchTextRequest
constructor
A new instance of GoogleMapsPlacesV1SearchTextRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1SearchTextRequest
Returns a new instance of GoogleMapsPlacesV1SearchTextRequest.
2884 2885 2886 |
# File 'lib/google/apis/places_v1/classes.rb', line 2884 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ev_options ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestEvOptions
Searchable EV options of a place search request.
Corresponds to the JSON property evOptions
2738 2739 2740 |
# File 'lib/google/apis/places_v1/classes.rb', line 2738 def @ev_options end |
#include_pure_service_area_businesses ⇒ Boolean Also known as: include_pure_service_area_businesses?
Optional. Include pure service area businesses if the field is set to true.
Pure service area business is a business that visits or delivers to customers
directly but does not serve customers at their business address. For example,
businesses like cleaning services or plumbers. Those businesses do not have a
physical address or location on Google Maps. Places will not return fields
including location
, plus_code
, and other location related fields for these
businesses.
Corresponds to the JSON property includePureServiceAreaBusinesses
2749 2750 2751 |
# File 'lib/google/apis/places_v1/classes.rb', line 2749 def include_pure_service_area_businesses @include_pure_service_area_businesses end |
#included_type ⇒ String
The requested place type. Full list of types supported: https://developers.
google.com/maps/documentation/places/web-service/place-types. Only support one
included type.
Corresponds to the JSON property includedType
2757 2758 2759 |
# File 'lib/google/apis/places_v1/classes.rb', line 2757 def included_type @included_type end |
#language_code ⇒ String
Place details will be displayed with the preferred language if available. If
the language code is unspecified or unrecognized, place details of any
language may be returned, with a preference for English if such details exist.
Current list of supported languages: https://developers.google.com/maps/faq#
languagesupport.
Corresponds to the JSON property languageCode
2766 2767 2768 |
# File 'lib/google/apis/places_v1/classes.rb', line 2766 def language_code @language_code end |
#location_bias ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationBias
The region to search. This location serves as a bias which means results
around given location might be returned.
Corresponds to the JSON property locationBias
2772 2773 2774 |
# File 'lib/google/apis/places_v1/classes.rb', line 2772 def location_bias @location_bias end |
#location_restriction ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationRestriction
The region to search. This location serves as a restriction which means
results outside given location will not be returned.
Corresponds to the JSON property locationRestriction
2778 2779 2780 |
# File 'lib/google/apis/places_v1/classes.rb', line 2778 def location_restriction @location_restriction end |
#max_result_count ⇒ Fixnum
Deprecated: Use page_size
instead. The maximum number of results per page
that can be returned. If the number of available results is larger than
max_result_count
, a next_page_token
is returned which can be passed to
page_token
to get the next page of results in subsequent requests. If 0 or no
value is provided, a default of 20 is used. The maximum value is 20; values
above 20 will be coerced to 20. Negative values will return an
INVALID_ARGUMENT error. If both max_result_count
and page_size
are
specified, max_result_count
will be ignored.
Corresponds to the JSON property maxResultCount
2790 2791 2792 |
# File 'lib/google/apis/places_v1/classes.rb', line 2790 def max_result_count @max_result_count end |
#min_rating ⇒ Float
Filter out results whose average user rating is strictly less than this limit.
A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence i.
e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the
nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results
with a less than 1.0 rating.
Corresponds to the JSON property minRating
2799 2800 2801 |
# File 'lib/google/apis/places_v1/classes.rb', line 2799 def @min_rating end |
#open_now ⇒ Boolean Also known as: open_now?
Used to restrict the search to places that are currently open. The default is
false.
Corresponds to the JSON property openNow
2805 2806 2807 |
# File 'lib/google/apis/places_v1/classes.rb', line 2805 def open_now @open_now end |
#page_size ⇒ Fixnum
Optional. The maximum number of results per page that can be returned. If the
number of available results is larger than page_size
, a next_page_token
is
returned which can be passed to page_token
to get the next page of results
in subsequent requests. If 0 or no value is provided, a default of 20 is used.
The maximum value is 20; values above 20 will be set to 20. Negative values
will return an INVALID_ARGUMENT error. If both max_result_count
and
page_size
are specified, max_result_count
will be ignored.
Corresponds to the JSON property pageSize
2817 2818 2819 |
# File 'lib/google/apis/places_v1/classes.rb', line 2817 def page_size @page_size end |
#page_token ⇒ String
Optional. A page token, received from a previous TextSearch call. Provide this
to retrieve the subsequent page. When paginating, all parameters other than
page_token
, page_size
, and max_result_count
provided to TextSearch must
match the initial call that provided the page token. Otherwise an
INVALID_ARGUMENT error is returned.
Corresponds to the JSON property pageToken
2826 2827 2828 |
# File 'lib/google/apis/places_v1/classes.rb', line 2826 def page_token @page_token end |
#price_levels ⇒ Array<String>
Used to restrict the search to places that are marked as certain price levels.
Users can choose any combinations of price levels. Default to select all price
levels.
Corresponds to the JSON property priceLevels
2833 2834 2835 |
# File 'lib/google/apis/places_v1/classes.rb', line 2833 def price_levels @price_levels end |
#rank_preference ⇒ String
How results will be ranked in the response.
Corresponds to the JSON property rankPreference
2838 2839 2840 |
# File 'lib/google/apis/places_v1/classes.rb', line 2838 def rank_preference @rank_preference end |
#region_code ⇒ String
The Unicode country/region code (CLDR) of the location where the request is
coming from. This parameter is used to display the place details, like region-
specific place name, if available. The parameter can affect results based on
applicable law. For more information, see https://www.unicode.org/cldr/charts/
latest/supplemental/territory_language_information.html. Note that 3-digit
region codes are not currently supported.
Corresponds to the JSON property regionCode
2848 2849 2850 |
# File 'lib/google/apis/places_v1/classes.rb', line 2848 def region_code @region_code end |
#routing_parameters ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingParameters
Parameters to configure the routing calculations to the places in the response,
both along a route (where result ranking will be influenced) and for
calculating travel times on results.
Corresponds to the JSON property routingParameters
2855 2856 2857 |
# File 'lib/google/apis/places_v1/classes.rb', line 2855 def routing_parameters @routing_parameters end |
#search_along_route_parameters ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters
Specifies a precalculated polyline from the Routes API defining the route to search. Searching
along a route is similar to using the locationBias
or locationRestriction
request option to bias the search results. However, while the locationBias
and locationRestriction
options let you specify a region to bias the search
results, this option lets you bias the results along a trip route. Results are
not guaranteed to be along the route provided, but rather are ranked within
the search area defined by the polyline and, optionally, by the locationBias
or locationRestriction
based on minimal detour times from origin to
destination. The results might be along an alternate route, especially if the
provided polyline does not define an optimal route from origin to destination.
Corresponds to the JSON property searchAlongRouteParameters
2870 2871 2872 |
# File 'lib/google/apis/places_v1/classes.rb', line 2870 def search_along_route_parameters @search_along_route_parameters end |
#strict_type_filtering ⇒ Boolean Also known as: strict_type_filtering?
Used to set strict type filtering for included_type. If set to true, only
results of the same type will be returned. Default to false.
Corresponds to the JSON property strictTypeFiltering
2876 2877 2878 |
# File 'lib/google/apis/places_v1/classes.rb', line 2876 def strict_type_filtering @strict_type_filtering end |
#text_query ⇒ String
Required. The text query for textual search.
Corresponds to the JSON property textQuery
2882 2883 2884 |
# File 'lib/google/apis/places_v1/classes.rb', line 2882 def text_query @text_query end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 |
# File 'lib/google/apis/places_v1/classes.rb', line 2889 def update!(**args) @ev_options = args[:ev_options] if args.key?(:ev_options) @include_pure_service_area_businesses = args[:include_pure_service_area_businesses] if args.key?(:include_pure_service_area_businesses) @included_type = args[:included_type] if args.key?(:included_type) @language_code = args[:language_code] if args.key?(:language_code) @location_bias = args[:location_bias] if args.key?(:location_bias) @location_restriction = args[:location_restriction] if args.key?(:location_restriction) @max_result_count = args[:max_result_count] if args.key?(:max_result_count) @min_rating = args[:min_rating] if args.key?(:min_rating) @open_now = args[:open_now] if args.key?(:open_now) @page_size = args[:page_size] if args.key?(:page_size) @page_token = args[:page_token] if args.key?(:page_token) @price_levels = args[:price_levels] if args.key?(:price_levels) @rank_preference = args[:rank_preference] if args.key?(:rank_preference) @region_code = args[:region_code] if args.key?(:region_code) @routing_parameters = args[:routing_parameters] if args.key?(:routing_parameters) @search_along_route_parameters = args[:search_along_route_parameters] if args.key?(:search_along_route_parameters) @strict_type_filtering = args[:strict_type_filtering] if args.key?(:strict_type_filtering) @text_query = args[:text_query] if args.key?(:text_query) end |