Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 2.35 KB

README.md

File metadata and controls

83 lines (57 loc) · 2.35 KB

Jogging-Tracker-API

About The Project

Jogging-Tracker-API is a RESTful API that tracks jogging times of users.

Functionality requirements:

  • Authentication: Create account / login / logout.
  • When logged in, a user can view, edit and delete entered jogging times.
  • Implement three roles with different permission levels: a regular user would only be able to CRUD on their owned records, a moderator would be able to CRUD users, and an admin would be able to CRUD all records and users.
  • Each time entry when entered has a date, distance, and time.
  • Filter by dates from-to.
  • Report on average speed & distance per week.

Built with

Getting Started

This is an list of needed instructions to set up your project locally, to get a local copy up and running follow these instructions.

Installation

Clone the repository

git clone git@github.com:GeekMind00/Jogging-Tracker-API.git

Navigate to repository directory

$ cd Jogging-Tracker-API

Project Setup

Install all gems:

$ bundle install

Update the database with new data model:

$ rails db:migrate

Start the web server on http://localhost:3000 by default:

$ rails server

Usage

HTTP verbs Paths  Used for
POST /signup Create a user
POST /login Authenticate a user
DELETE /logout Terminate a user's session
GET /users List all users
GET /users/:id Show a single user
POST /users Create a user
PUT /users/:id Update a user
DELETE /users/:id Delete a user
GET /jogging_records?from=date&to=date List all jogging records
GET /jogging_records/:id Show a single jogging record
POST /jogging_records Create a jogging_record
PUT /jogging_records/:id Update a jogging record
DELETE /jogging_records/:id Delete a jogging record
GET /weekly_report Show weekly report of jogging records

Postman Use Case Examples

JoggingTracker-API Collection