prkng / api

REST API powering Prkng apps and Web services
MIT License
10 stars 8 forks source link

Cities endpoint: additional info #21

Open mudar opened 8 years ago

mudar commented 8 years ago

The cities endpoint GET /v1/cities could return some extra info, to avoid hard-coding this client-side.

Example:

{
    "lat": 45.5016889,
    "display_name": "Montréal",
    "name": "montreal",
    "urban_area_radius": 30,
    "id": "2",
    "long": -73.567256,
    "country": "Canada",
    "country_code": "CA",
    "region": "Québec",
    "region_code": "QC",
    "bounds": ""
  }

These can be used for search, and sometimes for default city zooming. I think having country_code is more important than country region and region_code are just in case

@antonino-u any other info you think can be useful?

mudar commented 8 years ago

suggestion for bounds, based on mapbox geocoding results

bbox: [
-73.59235849999999,
45.47766699999999,
-73.50131999999999,
45.66372299999999
]

https://api.mapbox.com/geocoding/v5/mapbox.places/4204%20rue%20de.json?access_token=pk.eyJ1IjoiYXJuYXVkc3B1aGxlciIsImEiOiJSaEctSlVnIn0.R8cfngN9KkHYZx54JQdgJA&proximity=-73.5715056999999,45.483817899999956&country=ca

mudar commented 8 years ago

this could also provide the list of supported carshare services

carshare: ['car2go', 'communauto', 'auto-mobile', 'zipcar']
peakwinter commented 8 years ago

Do we really need both bounds AND country/region/etc ? It would be best to have just one and not both.

mudar commented 8 years ago

Well,