This is REST API providing information about locations (bars, restaurants) located within any radius around specified location. API is using Google Places API.
This is a Symfony project.
To setup project:
- Pull this repository
- Run composer update
- Answer questions regarding config/parameters.yml config file (you may use default values)
- Configure vhost (pointing /web directory)
- Configure url to your API in config/parameters.yml, param: api_gui[url]
- You may want to change default location and radius in config/parameters.yml file.
Please find API documentation under: {URL}/app_dev.php/api/doc It is autogenerated with NelmioApiDocBundle.
GUI is available under the following link: {URL}/app_dev.php/gui
In case of any problems, contact me at [email protected].
Attached please find some printscreens with API interface and example API response (folder: /docs)
Note: Google Places API returns up to 20 results. Next 20 + 20 results are available after few seconds (it was about 2-3 seconds when I tested it). I decided to make only one call and get just first 20 results. This solution may be improved in the future with:
- tokens, exactly like it works in Google Places Api (response contains token to the next page with next 20 results). User should ask for first 20 results, then he may request next 20 results (using token from API response), and finally the last 20. Such response may be cached.