SearchText
Source:
src/AWS/GeoPlaces/SearchText.ts
Runtime binding for geo-places:SearchText — free-form place search that
returns ranked results (POIs, addresses, streets) for a text query.
geo-places is a standalone, pay-per-call Amazon Location API with no
resource to manage: the binding takes no arguments and grants the function
geo-places:SearchText. Requests and responses are raw distilled types (no
marshalling).
Searching Places
Section titled “Searching Places”Provide the SearchTextHttp implementation layer on the Function effect
(.pipe(Effect.provide(AWS.GeoPlaces.SearchTextHttp))), bind in the init
phase, then call the client at runtime.
// initconst searchText = yield* AWS.GeoPlaces.SearchText();
// runtimeconst result = yield* searchText({ QueryText: "Space Needle, Seattle", MaxResults: 5,});const first = result.ResultItems?.[0];