Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexander784/towing

Car Towing API allows car owners to request towing services by submitting their location information to towing companies
https://github.com/alexander784/towing

api flask flaskrestx

Last synced: about 2 months ago
JSON representation

Car Towing API allows car owners to request towing services by submitting their location information to towing companies

Awesome Lists containing this project

README

        

## Car Towing API

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.

![Car Towing API](/image.png)
## Usage
1. Authentication: Obtain an API token by authenticating as a car owner. This token will be used to authorize requests to the API.

2. 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.

3.

Wait for Assistance: After submitting your location, wait for the towing company to respond and dispatch assistance to your location.

## API endpoints
`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

## Authentication

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

## Requesting Towing services

Send a POST request to `/tow/request`

`POST/tow/request`

{

`"location_id":"1"`

}

## Installation

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`

## License
Distributed under the MIT License. See LICENSE for more information.

## Author
Alexander Nyaga.