https://github.com/hasannadeem/worklook-api
A back-end test project for make school.
https://github.com/hasannadeem/worklook-api
postgresql rails rails-api rails5 ruby ruby-on-rails worklook-api
Last synced: 5 months ago
JSON representation
A back-end test project for make school.
- Host: GitHub
- URL: https://github.com/hasannadeem/worklook-api
- Owner: hasannadeem
- Created: 2019-11-11T20:27:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T20:39:43.000Z (almost 6 years ago)
- Last Synced: 2025-04-07T10:40:24.702Z (about 1 year ago)
- Topics: postgresql, rails, rails-api, rails5, ruby, ruby-on-rails, worklook-api
- Language: Ruby
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
# WorkLook-Api
WorkLook-API lets you create work order and workers. A work order is a job to be completed by one or more workers before its deadline. WorkLook-API provides the facility to assign workers on work orders and retrieve work orders assigned to any worker.
## Heroku WorkLook-API end-points
Request: Get all work orders of a particular worker in ascending order of deadline
Route: https://dry-basin-48875.herokuapp.com/api/v1/workers/:id/get_works
Method: GET
Request: Get all workers
Route: https://dry-basin-48875.herokuapp.com/api/v1/workers
Method: GET
Request: Create a worker
Route: https://dry-basin-48875.herokuapp.com/api/v1/workers
Method: POST
Request: Deleting a worker
Route: https://dry-basin-48875.herokuapp.com/api/v1/workers/:id
Method: DELETE
Request: For adding a worker in a particular work order
Route: https://dry-basin-48875.herokuapp.com/api/v1/works/:id/add_worker
Method: POST
Request: Get all work orders
Route: https://dry-basin-48875.herokuapp.com/api/v1/works
Method: GET
Request: Create a work order
Route: https://dry-basin-48875.herokuapp.com/api/v1/works
Method: POST
## System Requirements
* Ruby version 2.6.0
* Rails version 5.2.3
* PostgreSQL 9.5
## Getting Started
* Download and extract the zip file and go to the directory of project i.e `worklook-api`
* cd `worklook-api`
* Run `bundle install` to install all dependencies
* Setup database
* Run `rake db:create`
* Run `rake db:migrate`
* Run server `rails s`
* Use `postman` to send requests and retrieve responses
## How to Run Test Suite
Test cases are written using `rspec`. All the test cases are tested locally.
Anyone who wants to run it locally can use following process:
1. To run all the test cases use this:
* `rspec`