Skip to content

Kumbbar/TestTask

Repository files navigation


Test task

Flask REST API

Method - POST

PATHS

  • /objects/create
  • /objects/get
  • /objects/get_many
  • /objects/edit
  • /objects/delete
  • /objects/calculate_distance

Testing

git clone https://github.com/Kumbbar/Test_task.git
python3 -m venv env

Windows

env\Scripts\activate.bat

Linux or MacOS

source env/bin/activate


pip install -r Test_task/requirements.txt

JSON Examples

Create

{
    "title": "Moscow2",
    "longitude": 37.6158,
    "latitude": 55.7522
}

Get

{
    "title": "Moscow2"
}

Get many

Without json

Edit

{
    "title": "Moscow2",
    "longitude": 37.6151,
    "latitude": 55.7528
}

Delete

{
    "title": "Moscow2"
}

Calculate distance

{
    "first_object_title": "Moscow",
    "second_object_title": "Tyumen"
}

Releases

No releases published

Packages

No packages published