https://github.com/btronquo/php-restful-api
This one was an interview test that I failed. I decided to do it again but on my own and from scratch for the sake of getting back to the php development and because I think it's a cool use case.
https://github.com/btronquo/php-restful-api
api php7
Last synced: about 1 month ago
JSON representation
This one was an interview test that I failed. I decided to do it again but on my own and from scratch for the sake of getting back to the php development and because I think it's a cool use case.
- Host: GitHub
- URL: https://github.com/btronquo/php-restful-api
- Owner: btronquo
- Created: 2021-12-22T16:13:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-06T22:19:17.000Z (over 3 years ago)
- Last Synced: 2025-02-13T09:37:58.316Z (3 months ago)
- Topics: api, php7
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SIMPLE RESTFULL PHP API
! THIS PROJECT IS NOT YET FINISHED !
Current issues:
- lack of refactoring
- controllers missing
- more error cases and exeptions to handleThis one was an interview test that I failed.
I decided to do it again but on my own and from scratch for the sake of getting back to the php devlopment and because I think it's a cool use case.## SPECS
- No framework
- PDO
- RESTFUL URL (.htaccess)## THE API
`_GET /books`
> get all books from the library database`_GET /books/{id}`
> get specified book (by id)`_POST /books`
> post a new book and show the record just after the query
- optional: order = ('title' or 'author')`_GET /author/{name}/books`
> get all the books from a given author name
- mandatory: {name}
- optional: order = ('id' or 'title')