This Sinatra application is the backend to Escape. It currently consumes three external APIs, Google Places, Mountain Project, and Hiking Project. We customized all the endpoints to return information required for Escape's UI.
We used Sinatra for its lightweight build.
Clone the Sinatra microservice with:
git clone git@github.com:mintona/escape_microservice.git
cd escape-microservice
bundle install
bundle exec rake db:create
API Keys Necessary:
Gems Used:
Production:
- sinatra
- pg
- activerecord
- sinatra-activerecord
- rake
- httparty
- json
- dotenv
- fast_jsonapi
- pry
Testing and Development:
- pry
- rspec
- rspec-core
- rack-test
- capybara
- webmock
- vcr
- shoulda-matchers
- database-cleaner-active-record
These are the available endpoints escape-microservice hits, along with both the required and possible query parameters.
The base url to query is: https://escape-app-api.herokuapp.com/api/v1/
No API key is required.
Endpoint: destination/:place
Below example for: destination/denver
{
"data": {
"id": "648",
"type": "destination",
"attributes": {
"name": "Denver",
"full_address": "Denver, CO, USA",
"longitude": -104.990251,
"latitude": 39.7392358
}
}
}
**Details coming soon!
**Details coming soon!
**Details coming soon!