REST API for Flutter Auction App using Codeigniter 4
- Composer
- PHP 8.0+, MySQL or XAMPP with
-intl
extension enable
- Rename
env
file to.env
. - Set the jwt secretkey and token expiration in the
.env
file if you want to change them. - Install dependencies:
composer install
- Ensure your database is setup correctly, then run the migrations:
php spark migrate -all
POST /api/login
Parameter | Type | Description |
---|---|---|
username |
string |
Required. Your username |
password |
string |
Required. Your password |
POST /api/users
Parameter | Type | Description |
---|---|---|
username |
string |
Required. |
password |
string |
Required. |
name |
string |
Required. |
email |
string |
Required. |
phone |
string |
Warning:warning: Make sure to add authorization header (Bearer token)
GET /api/auctions
GET /api/auctions/{id}
GET /api/users/auctions
GET /api/auctions/{id}/bids
POST /api/auctions
PATCH /api/auctions/{id}
PATCH /api/auctions/{id}/winner
PATCH /api/auctions/{id}/close
DELETE /api/auctions/{id}
GET /api/bids
GET /api/bids/{id}
GET /api/users/bids
POST /api/bids
PATCH /api/bids/{id}
DELETE /api/bids/{id}
GET /api/items
GET /api/items/{id}
POST /api/items
PATCH /api/items/{id}
DELETE /api/items{id}
GET /api/users
GET /api/users/{id}
PATCH /api/users/{id}
DELETE /api/users/{id}
Still need more improvement
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.