getResults

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

this one is more generic. It's used when the more specific one didn't return a proper Polygon

Return

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

Parameters

q

the full name of the administrative unit, typically using the AdministrativeUnitName's toString

polygonGeoJSON

speficies the API to return the geoJSON format

limit

limits the result of only one

format

speficies that will be a json return