This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...
The back-end consists of an API that receives a message and answers it with data from a database. The database is composed of three tables, to know, one for user data, one for instructors data, and one for classes.
- name
- password_digest
- name
- trainingType
- gymName
- instImage - Instructor's image
- gymImage - Dragon's image
- classTime
- gym_instructor_id
- status - Boolean (not used)
- user_id
Base URL: https://trainers-appointment-api.herokuapp.com
/users
- GET - to receive an object with all users
- POST - to create a new user - with parameters:
- name
- password
- password_confirmation
/users/:id
- PATCH - to edit a user - with parameters:
- name
- password
- password_confirmation
- GET - to receive a specific user's data
- DELETE - to delete a user
/login
- GET - to check login parameters - with parameters:
- password
/gym_instructors
- GET - to receive an object with all users
- POST - to create a new instructor - with parameters:
- name
- instImage
- gymName
- trainingType
- gymImage
instructors/id
- GET - to receive a specific instructor's data
/gym_classes
- GET - to receive an object with all the classes
- POST - to create a new class - with parameters:
- instructor_id
- user_id
- classTime
- status
gym_classes/:id
- DELETE - to delete a specific class
To use this API locally, follow the steps:
- Download the repository as zip
- Extract the data
- Open your terminal and navigate to repository's folder
- Run:
- Bundle install
- Rails db:create
- Rails db:migrate
- Rails db:seed
- Rails server
To create this project I used:
- Ruby on Rails
- bcrypt gem
- Heroku
- Postgresql
- rspec
Author: Wilfried Canirinka
Follow me on Twitter, visit my Github portfolio, my Linkedin.
I have no business rights to the characters used in this API. This is only for learning purposes. This project has landed good jobs and created some curiosity for me to continue pushing forward