CrashPAD is a AirBnB clone, written to demonstrate the complexities of building a full-scale web application. It allows users to list and book "listings".
- Clone the repository:
git clone https://github.com/dshinzie/crash-pad.git
- Bundle Install:
bundle install
- Install Figaro:
figaro install
- Retrieve Twilio/Authy and Google Maps API keys
- Configure the
application.yml
file with:- AUTHY_KEY
- AUTHY_SID
- TWILIO_ACCOUNT_SID
- TWILIO_AUTH_TOKEN
- TWILIO_NUMBER
- GOOGLE_MAPS_API
- Start Rails server:
rails s
Testing is done via RSpec/Capybara and can be triggered in the terminal with:
rspec
- Server: Ruby on Rails -> 5.0.1
- Client-side: ERB/HTML, Vanilla JS
- Database: PostgreSQL
-
In order to use our reviews api, you will need an api_key. - To get your key, create account on crash-pad.heroku.com, and go to your "Dashboard". Your "API_Key" will be on your "Dashboard" page.
-
Once you have your key, you can make requests to our reviews API. To authenticate, simply pass your key in the params.
-
With our reviews API, you can READ, CREATE, UPDATE, and DELETE your own reviews.
- GET crash-pad.herokuapp.com/api/v1/listings/INSERT LISTING_ID_HERE/reviews.json?api_key=Your_api_key_here
- Required parameters: api_key
- GET crash-pad.herokuapp.com/api/v1/listings/INSERT LISTING_ID HERE/INSERT REVIEW_ID HERE.json?api_key=Your_api_key_here - Required parameters: api_key
- POST crash-pad.herokuapp.com/api/v1/listings/INSERT LISTING_ID_HERE/reviews.json?api_key=Your_api_key_here&body=insert body of review here_&CONTENT_TYPE='application/json'&ACCEPT='application/json' - Required parameters: api_key, body(body of your review as a string), CONTENT_TYPE = 'application/json' ACCEPT = 'application/json'
- PATCH crash-pad.herokuapp.com/api/v1/listings/INSERT LISTING_ID HERE/INSERT REVIEW_ID HERE.json?api_key=Your_api_key_here&body=insert body of review here&CONTENT_TYPE='application/json'&ACCEPT='application/json' - Required parameters: api_key, body(body of your review as a string), CONTENT_TYPE = 'application/json' ACCEPT = 'application/json'
- DELETE crash-pad.herokuapp.com/api/v1/listings/INSERT LISTING_ID HERE/INSERT REVIEW_ID HERE.json?api_key=Your_api_key_here - Required parameters: api_key