Projeto para cadastro e recuperação Pontos de Interesse (POI's).
- Clone o repositório
- Crie um virtualenv com Python 3.5
- Ative o seu virtualev.
- Instale as dependências.
- Execute os testes.
- Inicialize os dados de teste.
git clone https://github.com/n1lux/xy-inc.git xyinc
cd xyinc
python -m venv .xyinc
source .xyinc/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py test
python manage.py initial_data
python manage.py collectstatic
python manage.py runserver
Dados para o envio do json
{
"name": <string>,
"x": <int>,
"y": <int>,
}
[GET] http://localhost:8000/api/v0/pois/
[POST] http://localhost:8000/api/v0/pois/
No campo Media type: application/json
No campo content :
{"name": "teste pois navegador", "x": 45, "y": 20 }
[GET] http://localhost:8000/api/v0/pois/search/?x=20&y=10&d-max=10
curl -X GET -H "Accept:application/json" http://localhost:8000/api/v0/pois/
curl -i -X POST -H "Content-Type:application/json" http://localhost:8000/api/v0/pois/ -d '{"name":"teste poi curl", "x": 25, "y": 10}'
curl -X GET -H "Accept:application/json" "http://localhost:8000/api/v0/pois/search/?x=20&y=10&d-max=10"