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
-
#included_type ⇒ String
The requested place type.
-
#language_code ⇒ String
Place details will be displayed with the preferred language if available.
-
#location ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocation
[Deprecated!]The region to search.
-
#location_bias ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationBias
The region to search.
-
#location_restriction ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationRestriction
The region to search.
-
#max_result_count ⇒ Fixnum
Maximum number of results to return.
-
#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 open at a specific time.
-
#price_levels ⇒ Array<String>
Used to restrict the search to places that are marked as certain price levels.
-
#price_range ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1Int32Range
int 32 range.
-
#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.
-
#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.
912 913 914 |
# File 'lib/google/apis/places_v1/classes.rb', line 912 def initialize(**args) update!(**args) end |
Instance Attribute Details
#included_type ⇒ String
The requested place type. Full list of types supported: https://developers.
google.com/places/supported_types. Only support one included type.
Corresponds to the JSON property includedType
820 821 822 |
# File 'lib/google/apis/places_v1/classes.rb', line 820 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
829 830 831 |
# File 'lib/google/apis/places_v1/classes.rb', line 829 def language_code @language_code end |
#location ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocation
[Deprecated!]The region to search.
Corresponds to the JSON property location
834 835 836 |
# File 'lib/google/apis/places_v1/classes.rb', line 834 def location @location 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
840 841 842 |
# File 'lib/google/apis/places_v1/classes.rb', line 840 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
846 847 848 |
# File 'lib/google/apis/places_v1/classes.rb', line 846 def location_restriction @location_restriction end |
#max_result_count ⇒ Fixnum
Maximum number of results to return. It must be between 1 and 20, inclusively.
If the number is unset, it falls back to the upper limit. If the number is set
to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property maxResultCount
853 854 855 |
# File 'lib/google/apis/places_v1/classes.rb', line 853 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 an float between 0 and 5 (inclusively) at a 0.5 cadence
i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep parity with
LocalRefinement_UserRating. 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
863 864 865 |
# File 'lib/google/apis/places_v1/classes.rb', line 863 def @min_rating end |
#open_now ⇒ Boolean Also known as: open_now?
Used to restrict the search to places that are open at a specific time.
open_now marks if a business is currently open.
Corresponds to the JSON property openNow
869 870 871 |
# File 'lib/google/apis/places_v1/classes.rb', line 869 def open_now @open_now 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
877 878 879 |
# File 'lib/google/apis/places_v1/classes.rb', line 877 def price_levels @price_levels end |
#price_range ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1Int32Range
int 32 range. Both min and max are optional. If only min is set, then the
range only has a lower bound. If only max is set, then range only has an upper
bound. At least one of min and max must be set. Values are inclusive.
Corresponds to the JSON property priceRange
884 885 886 |
# File 'lib/google/apis/places_v1/classes.rb', line 884 def price_range @price_range end |
#rank_preference ⇒ String
How results will be ranked in the response.
Corresponds to the JSON property rankPreference
889 890 891 |
# File 'lib/google/apis/places_v1/classes.rb', line 889 def rank_preference @rank_preference end |
#region_code ⇒ String
The Unicode country/region code (CLDR) of the location where the request is
coming from. It is used to display the place details, like region-specific
place name, if available. For more information, see http://www.unicode.org/
reports/tr35/#unicode_region_subtag. Note that 3-digit region codes are not
currently supported.
Corresponds to the JSON property regionCode
898 899 900 |
# File 'lib/google/apis/places_v1/classes.rb', line 898 def region_code @region_code 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
904 905 906 |
# File 'lib/google/apis/places_v1/classes.rb', line 904 def strict_type_filtering @strict_type_filtering end |
#text_query ⇒ String
Required. The text query for textual search.
Corresponds to the JSON property textQuery
910 911 912 |
# File 'lib/google/apis/places_v1/classes.rb', line 910 def text_query @text_query end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 |
# File 'lib/google/apis/places_v1/classes.rb', line 917 def update!(**args) @included_type = args[:included_type] if args.key?(:included_type) @language_code = args[:language_code] if args.key?(:language_code) @location = args[:location] if args.key?(:location) @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) @price_levels = args[:price_levels] if args.key?(:price_levels) @price_range = args[:price_range] if args.key?(:price_range) @rank_preference = args[:rank_preference] if args.key?(:rank_preference) @region_code = args[:region_code] if args.key?(:region_code) @strict_type_filtering = args[:strict_type_filtering] if args.key?(:strict_type_filtering) @text_query = args[:text_query] if args.key?(:text_query) end |