PlacesClientKt

public final class PlacesClientKt


Summary

Public methods

static final @NonNull FetchPhotoResponse
awaitFetchPhoto(
    @NonNull PlacesClient receiver,
    @NonNull PhotoMetadata photoMetadata,
    @ExtensionFunctionType @NonNull Function1<@NonNull FetchPhotoRequest.BuilderUnit> actions
)

Wraps PlacesClient.fetchPhoto in a suspending function.

static final @NonNull FetchPlaceResponse
awaitFetchPlace(
    @NonNull PlacesClient receiver,
    @NonNull String placeId,
    @NonNull List<@NonNull Place.Field> placeFields,
    @ExtensionFunctionType @NonNull Function1<@NonNull FetchPlaceRequest.BuilderUnit> actions
)

Wraps PlacesClient.fetchPlace in a suspending function.

static final @NonNull FetchResolvedPhotoUriResponse

Wraps PlacesClient.fetchResolvedPhotoUri in a suspending function.

static final @NonNull FindAutocompletePredictionsResponse

Wraps PlacesClient.findAutocompletePredictions in a suspending function.

static final @NonNull FindCurrentPlaceResponse
@RequiresPermission(anyOf = ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION"])
awaitFindCurrentPlace(
    @NonNull PlacesClient receiver,
    @NonNull List<@NonNull Place.Field> placeFields
)

Wraps PlacesClient.findCurrentPlace in a suspending function.

static final @NonNull IsOpenResponse
awaitIsOpen(
    @NonNull PlacesClient receiver,
    @NonNull String placeId,
    Long utcTimeMillis
)

Wraps PlacesClient.isOpen in a suspending function with the given placeId.

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.

static final @NonNull SearchByTextResponse
awaitSearchByText(
    @NonNull PlacesClient receiver,
    @NonNull String textQuery,
    @NonNull List<@NonNull Place.Field> placeFields,
    @ExtensionFunctionType @NonNull Function1<@NonNull SearchByTextRequest.BuilderUnit> actions
)

Wraps PlacesClient.searchByText in a suspending function.

static final @NonNull SearchNearbyResponse
awaitSearchNearby(
    @NonNull PlacesClient receiver,
    @NonNull LocationRestriction locationRestriction,
    @NonNull List<@NonNull Place.Field> placeFields,
    @ExtensionFunctionType @NonNull Function1<@NonNull SearchNearbyRequest.BuilderUnit> actions
)

Wraps PlacesClient.searchNearby in a suspending function.

Public methods

awaitFetchPhoto

public static final @NonNull FetchPhotoResponse awaitFetchPhoto(
    @NonNull PlacesClient receiver,
    @NonNull PhotoMetadata photoMetadata,
    @ExtensionFunctionType @NonNull Function1<@NonNull FetchPhotoRequest.BuilderUnit> 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.BuilderUnit> 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.BuilderUnit> 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.BuilderUnit> 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.BuilderUnit> 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.BuilderUnit> 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.