Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alexander784/towing
- Owner: alexander784
- Created: 2024-05-20T08:09:01.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-01T15:47:23.000Z (7 months ago)
- Last Synced: 2024-06-01T19:08:22.595Z (7 months ago)
- Topics: api, flask, flaskrestx
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 keyCreating virtual env
`pipenv install pipenv shell`## License
Distributed under the MIT License. See LICENSE for more information.## Author
Alexander Nyaga.