system dependencies - python 3.7, git, virtualenv
API Setup
- git clone https://github.com/nareshh74/weather_service.git
- virtualenv venv --python=/usr/bin/python3
- source venv/bin/activate
- pip3 install -r requirements.txt
- place .env file in root folder
- python3 manage.py runserver
Endpoint documentation
- Login API ENDPOINT POST ~/auth/login/ JSON - mandatory { "username": , "password": }
- Logout API ENDPOINT POST ~/auth/logout/ HEADER - mandatory Authorization - Bearer
- Query API ENDPOINT GET ~/weather/ HEADER - mandatory Authorization - Bearer QUERY PARAMS - optional - works like limit offset start - end -
- Email API ENDPOINT GET ~/weather/sendEmail HEADER - mandatory Authorization - Bearer JSON - mandatory { "receiverEmailList": <array type - list of emails> }
Please feel free to play with endpoints to know about expected responses.