public class TextSearchRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TextSearchRequest.Response |
PendingResult.Callback<T>
Constructor and Description |
---|
TextSearchRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
T |
await()
Performs the GET request synchronously.
|
T |
awaitIgnoreError()
Performs the request synchronously, ignoring exceptions while performing the request and errors
returned by the server.
|
void |
cancel()
Attempt to cancel the request.
|
A |
channel(java.lang.String channel)
A channel to pass with the request.
|
A |
custom(java.lang.String parameter,
java.lang.String value)
Custom parameter.
|
A |
language(java.lang.String language)
The language in which to return results.
|
TextSearchRequest |
location(LatLng location)
location is the latitude/longitude around which to retrieve place information.
|
TextSearchRequest |
maxPrice(PriceLevel priceLevel)
maxPrice restricts to places that are at most this price level.
|
TextSearchRequest |
minPrice(PriceLevel priceLevel)
minPrice restricts to places that are at least this price level.
|
TextSearchRequest |
name(java.lang.String name)
name is one or more terms to be matched against the names of places, separated with a space
character.
|
TextSearchRequest |
openNow(boolean openNow)
openNow returns only those places that are open for business at the time the query is sent.
|
TextSearchRequest |
pageToken(java.lang.String nextPageToken)
pageToken returns the next 20 results from a previously run search.
|
protected A |
param(java.lang.String key,
java.lang.String val) |
protected A |
param(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected java.util.Map<java.lang.String,java.lang.String> |
params() |
TextSearchRequest |
query(java.lang.String query)
query is the text string on which to search, for example: "restaurant".
|
TextSearchRequest |
radius(int radius)
radius defines the distance (in meters) within which to bias place results.
|
TextSearchRequest |
rankby(RankBy ranking)
rankby specifies the order in which results are listed.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after the request has been
completed.
|
TextSearchRequest |
type(PlaceType type)
type restricts the results to places matching the specified type.
|
protected void |
validateRequest() |
public TextSearchRequest(GeoApiContext context)
public TextSearchRequest query(java.lang.String query)
public TextSearchRequest location(LatLng location)
public TextSearchRequest radius(int radius)
public TextSearchRequest minPrice(PriceLevel priceLevel)
public TextSearchRequest maxPrice(PriceLevel priceLevel)
public TextSearchRequest name(java.lang.String name)
public TextSearchRequest openNow(boolean openNow)
public TextSearchRequest pageToken(java.lang.String nextPageToken)
public TextSearchRequest rankby(RankBy ranking)
public TextSearchRequest type(PlaceType type)
protected void validateRequest()
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
setCallback
in interface PendingResult<T>
public final T await() throws ApiException, java.lang.InterruptedException, java.io.IOException
PendingResult
await
in interface PendingResult<T>
ApiException
java.lang.InterruptedException
java.io.IOException
public final T awaitIgnoreError()
PendingResult
awaitIgnoreError
in interface PendingResult<T>
public final void cancel()
PendingResult
cancel
in interface PendingResult<T>
protected A param(java.lang.String key, java.lang.String val)
protected A param(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected java.util.Map<java.lang.String,java.lang.String> params()
public final A language(java.lang.String language)
language
- The language code, e.g. "en-AU" or "es"public A channel(java.lang.String channel)
channel
- String to pass with the request for analyticspublic A custom(java.lang.String parameter, java.lang.String value)