getResultsState

@GET(value = "/search?")
abstract suspend fun getResultsState(@Query(value = "state") state: String, @Query(value = "country") country: String, @Query(value = "polygon_geojson") polygonGeoJSON: Int = 1, @Query(value = "limit") limit: Int = 1, @Query(value = "format") format: String = "jsonv2"): List<JSONResult<GeoJSONAttributes>>

Fetches the results for a specific state using the Nominatim API.

Return

a List of results for the search, as it's limited to 1 the result would be only one

Parameters

state

The state name (typically from the adminArea property of AdministrativeUnitName).

country

The country name (typically from the countryName property of AdministrativeUnitName).

polygonGeoJSON

specifies the API to return the geoJSON format

limit

limits the result of only one

format

specifies that will be a json return