Skip to content

tomasz-rzesikowski/cars_API

Repository files navigation

Cars

Short description.

Simple REST application providing access to data about cars, and system for rating them.

How to run?

Prerequisites

  1. You have to have installed docker and docker-compose on your computer.

Starting

  1. Rename .env-default file to .env.
  2. Type command docker-compose up --build in terminal in project root directory.
  3. Open browser with url http://0.0.0.0:8000 or http://127.0.0.1:8000 on Windows.
  4. Enjoy!

Endpoints

  1. https://capirs.herokuapp.com/cars/ GET and POST cars.
  2. https://capirs.herokuapp.com/cars/ DELETE a car.
  3. https://capirs.herokuapp.com/popular/ GET information about cars popularity.
  4. https://capirs.herokuapp.com/rate/ POST raring for the car.

API description.

You can check documentation for API here.

Tests (coverage)

Run tests and coverage.

  1. Start application.
  2. To run tests, type command docker-compose exec backend coverage run manage.py test in terminal in project root directory.
  3. To run coverage, type command docker-compose exec backend python manage.py test in terminal in project root directory.
  4. To view coverage report in command line, type command docker-compose exec backend coverage report in terminal in project root directory.
Module statements missing excluded coverage
Total 77 0 0 100%
cars/models.py 16 0 0 100%
cars/serializers.py 39 0 0 100%
cars/urls.py 4 0 0 100%
cars/views.py 18 0 0 100%

Licence

 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.  Poul-Henning Kamp
 * ----------------------------------------------------------------------------

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published