PlacesClientKt
public final class PlacesClientKt
Summary
Public methods
awaitFetchPhoto
public static final @NonNull FetchPhotoResponse awaitFetchPhoto(
@NonNull PlacesClient receiver,
@NonNull PhotoMetadata photoMetadata,
@ExtensionFunctionType @NonNull Function1<@NonNull FetchPhotoRequest.Builder, Unit> actions
)
Wraps PlacesClient.fetchPhoto
in a suspending function.
Fetches a photo. If an error occurred, an ApiException
will be thrown.
awaitFetchPlace
public static final @NonNull FetchPlaceResponse awaitFetchPlace(
@NonNull PlacesClient receiver,
@NonNull String placeId,
@NonNull List<@NonNull Place.Field> placeFields,
@ExtensionFunctionType @NonNull Function1<@NonNull FetchPlaceRequest.Builder, Unit> actions
)
Wraps PlacesClient.fetchPlace
in a suspending function.
Fetches the details of a place. If an error occurred, an ApiException
will be thrown.
awaitFetchResolvedPhotoUri
public static final @NonNull FetchResolvedPhotoUriResponse awaitFetchResolvedPhotoUri(
@NonNull PlacesClient receiver,
@NonNull PhotoMetadata photoMetadata,
@ExtensionFunctionType @NonNull Function1<@NonNull FetchResolvedPhotoUriRequest.Builder, Unit> actions
)
Wraps PlacesClient.fetchResolvedPhotoUri
in a suspending function.
Fetches a resolved uri for the photo of a place. If an error occurred, an ApiException
will be thrown.
awaitFindAutocompletePredictions
public static final @NonNull FindAutocompletePredictionsResponse awaitFindAutocompletePredictions(
@NonNull PlacesClient receiver,
@ExtensionFunctionType @NonNull Function1<@NonNull FindAutocompletePredictionsRequest.Builder, Unit> actions
)
Wraps PlacesClient.findAutocompletePredictions
in a suspending function.
Fetches autocomplete predictions. If an error occurred, an ApiException
will be thrown.
awaitFindCurrentPlace
@RequiresPermission(anyOf = ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION"])
public static final @NonNull FindCurrentPlaceResponse awaitFindCurrentPlace(
@NonNull PlacesClient receiver,
@NonNull List<@NonNull Place.Field> placeFields
)
Wraps PlacesClient.findCurrentPlace
in a suspending function.
Fetches the approximate current place of the user's device. Calling this method without granting the appropriate permissions will result in a SecurityException
being thrown. In addition, if an error occurred while fetching the current place, an ApiException
will be thrown.
awaitIsOpen
public static final @NonNull IsOpenResponse awaitIsOpen(
@NonNull PlacesClient receiver,
@NonNull String placeId,
Long utcTimeMillis
)
Wraps PlacesClient.isOpen
in a suspending function with the given placeId.
Returns whether or not a place is open. If an error occurred, an ApiException
will be thrown.
awaitIsOpen
public static final @NonNull IsOpenResponse awaitIsOpen(
@NonNull PlacesClient receiver,
@NonNull Place place,
Long utcTimeMillis
)
Wraps PlacesClient.isOpen
in a suspending function with the given Place
object.
Returns whether or not a place is open. If an error occurred, an ApiException
will be thrown.
awaitSearchByText
public static final @NonNull SearchByTextResponse awaitSearchByText(
@NonNull PlacesClient receiver,
@NonNull String textQuery,
@NonNull List<@NonNull Place.Field> placeFields,
@ExtensionFunctionType @NonNull Function1<@NonNull SearchByTextRequest.Builder, Unit> actions
)
Wraps PlacesClient.searchByText
in a suspending function.
Fetches the place(s) of interest using a text query. If an error occurred, an ApiException
will be thrown.
awaitSearchNearby
public static final @NonNull SearchNearbyResponse awaitSearchNearby(
@NonNull PlacesClient receiver,
@NonNull LocationRestriction locationRestriction,
@NonNull List<@NonNull Place.Field> placeFields,
@ExtensionFunctionType @NonNull Function1<@NonNull SearchNearbyRequest.Builder, Unit> actions
)
Wraps PlacesClient.searchNearby
in a suspending function.
Fetches the place(s) of interest using a location. If an error occurred, an ApiException
will be thrown.