https://github.com/cyberinferno/fuber-api
An on call cab service RESTful API
https://github.com/cyberinferno/fuber-api
mysql rest-api yii2
Last synced: about 2 months ago
JSON representation
An on call cab service RESTful API
- Host: GitHub
- URL: https://github.com/cyberinferno/fuber-api
- Owner: cyberinferno
- Created: 2018-05-13T18:35:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-14T08:26:58.000Z (about 8 years ago)
- Last Synced: 2025-01-17T14:56:56.509Z (over 1 year ago)
- Topics: mysql, rest-api, yii2
- Language: PHP
- Size: 60.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Füber
An on call taxi service.
Built using Yii2 PHP framework making use of MySQL database.
## Requirement
* PHP 7.0
* Composer Package Manager
* MySQL
## Running the project
* Clone project: `git clone https://github.com/cyberinferno/fuber-api.git`
* Install dependencies: `composer install`
* Run the command `./init` to initialize the project
* Update `.env` file with proper database name and credentials
* Run database migrations using the command `./yii migrate`
* Run dev server: `./yii serve --docroot=api/web`
## API Endpoints
| Endpoint | HTTP Verb | Payload | Explanation |
|:----------:|:-----------:|:--------:|:--------|
| /oauth2/token| POST | {"grant_type": "password", "username": "fubertest1", "password": "fubertest1", "client_id":"testclient", "client_secret":"testpass"} | Get access token |
| /car | GET | - | List all available cars |
| /booking | POST | {"type": 10, "currentLocationX": 10, "currentLocationY": 15, "destinationLocationX": 30, "destinationLocationY": 15} | Book a ride |
| /booking/:id | PUT | {} | End a ride |
| /booking/:id | GET | - | Check ride details |