To run the setup.sh file you need the awscli and duckdb installed. You can install them using the following commands:
pip install awscli
pip install duckdbTo run the API service, you need to have Ruby installed and have the roda and sequel gems installed. You can install them using the following commands:
gem install roda
gem install sequelIf you haven't already, authorize awscli with your account.
Run the setup.sh file to download the data and set up the database.
./setup.shThe app is a simple Roda application, which can be run with rackup. The API service will be available at http://localhost:9292.
Currently, the API service has the following endpoints:
GET /poi?id=[ID]- Returns data for a POI with the given ID.GET /neaby?lat=[LAT]&lon=[LON]&page=[PAGE]- Returns data for POIs nearest the provided coordinates. Thepageparameter is optional and defaults to 1.GET /search?query=[QUERY]&country=[COUNTRY]&page=[PAGE]- Returns data for POIs that match the provided query. Thecountryparameter is the two-letter country code (e.g. "US"). Thepageparameter is optional and defaults to 1.