bookshop REST API example in APIGILITY
- PHP 5.5+
- ext-intl
$ git clone https://github.com/JaroslavKrenar/bookshop-apigility.git
$ php composer.phar install
You can configure database connection in config/autoload/user.global.php
(mysql
is selected as default) and create table from file data/book.sql
:
$ php -S localhost:8000 -t public/ public/index.php
Name | Type | Description |
---|---|---|
isbn | string | ISBN |
author | string | Author name |
title | string | Book title |
release_date | string | Release data. You can use ```" |
minimum_rating | float | Search by minimum rating |
$ http://localhost:8000/books?release_date=2005-07-04
Name | Type | Description |
---|---|---|
isbn | string | ISBN |
author | string | Author name |
title | string | Book title |
rating | float | Book rating |
release_date | string | Release data in format Y-m-d |
Request
$ http://localhost:8000/books
{
'isbn' => "9780833052643"
'author' => "Pascale Lesch"
'title' => "WILL do next! If they had to fall a long way. So."
'rating' => 3.44
'release_date' => "2016-01-23"
}