This is an api built by Kyle Ashmore for consideration for a Rails Developer position at the company Metova.
Breakdown of how the application works:
- After cloning the repo run the following commands:
bundle exec rake db:schema:load
bundle exec rake db:migrate
bundle exec rake db:seed
- This will add all of the database info needed to run the application
- Authenticate using Name and Email via JSON at
:3000/authenticate
viaPOST
method in your favorite REST client:- Example:
{ "name": "Ron", "email": "ron.swanson@pawnee.gov" }
- Example:
- Take the generated authentication token and add it to your headers:
Authorization: Bearer < insert authentication token here >.
- Gain access to the rest of the API.
Resources used to make this application:
- rails-api
- rspec-rails
- jwt
- Advanced REST Client
- Sublime Text 2
- Lots of coffee.
- How API endpoints are accomplished in Rails using rails-api instead of the full library.
- Added token based authentication with the potential of variable algorithms for hightened security.
- How serializers worked in producing customized JSON objects.
- How to work with SQLite3 databases with Rails applications.