public class PhotoRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PhotoRequest.Response |
PendingResult.Callback<T>
Constructor and Description |
---|
PhotoRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
T |
await()
Performs the 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 |
language(java.lang.String language)
The language in which to return results.
|
PhotoRequest |
maxHeight(int maxHeight)
Set the maxHeight for this request.
|
PhotoRequest |
maxWidth(int maxWidth)
Set the maxWidth for this request.
|
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() |
PhotoRequest |
photoReference(java.lang.String photoReference)
Set the photoReference for this request.
|
void |
setCallback(PendingResult.Callback<T> callback)
Performs the request asynchronously, calling onResult or onFailure after
the request has been completed.
|
protected void |
validateRequest() |
public PhotoRequest(GeoApiContext context)
protected void validateRequest()
public PhotoRequest photoReference(java.lang.String photoReference)
photoReference
- A string identifier that uniquely identifies a photo. Photo references are returned from
either a Place Search or Place Details request.public PhotoRequest maxHeight(int maxHeight)
maxHeight
- Specifies the maximum desired height, in pixels, of the image returned by the Place Photos service.public PhotoRequest maxWidth(int maxWidth)
maxWidth
- Specifies the maximum desired width, in pixels, of the image returned by the Place Photos service.public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
setCallback
in interface PendingResult<T>
public final T await() throws java.lang.Exception
PendingResult
await
in interface PendingResult<T>
java.lang.Exception
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 analytics