Jogging-Tracker-API is a RESTful API that tracks jogging times of users.
- 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
userwould only be able to CRUD on their owned records, amoderatorwould be able to CRUD users, and anadminwould 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.
This is an list of needed instructions to set up your project locally, to get a local copy up and running follow these instructions.
Clone the repository
git clone git@github.com:GeekMind00/Jogging-Tracker-API.gitNavigate to repository directory
$ cd Jogging-Tracker-APIInstall all gems:
$ bundle installUpdate the database with new data model:
$ rails db:migrateStart the web server on http://localhost:3000 by default:
$ rails server| 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 |