Car Towing API allows car owners to request towing services by submitting their location information to towing companies.Car owners can quickly and easily request assistance when their vehicles get stuck.
-
Authentication: Obtain an API token by authenticating as a car owner. This token will be used to authorize requests to the API.
-
Submit Location: Once authenticated, submit your location information to request towing services. Include details such as:
- current location
- Model of the Car.
- Color of the car.
-
Wait for Assistance: After submitting your location, wait for the towing company to respond and dispatch assistance to your location.
POST /auth/signup Register as a user of the API.
POST/auth/login Authenticate as a car owner stuck to obtain an API token.
POST/tow/request Submit your location information to request towing services
To authenticate with the Car Towing API, send a POST request to /auth/login with your username and password. Upon successful authentication, you will receive an API token in the response.
Examples Request:
POST /auth/login
{
"username": ``"your_username",
"password": "your_password"
}
Example request:
{
"access_token": "your_access_token"
}
Include the obtained access_token in the Authorization header of subsequent requests to authorize access to protected endpoints
Send a POST request to `/tow/request`
POST/tow/request
{
"location_id":"1"
}
Clone the repo to your local machine
Navigate to project directory
Create a your preferred virtual environment
Install dependencies
Run the App
Create a .env file and generate your secret key
Creating virtual env
pipenv install pipenv shell
Distributed under the MIT License. See LICENSE for more information.
Alexander Nyaga.
