Recommend this page to a friend! |
Classes of Natanael Simões | PHP API Framework | README.md | Download |
|
DownloadPhpAPICreate a API for your PHP project in minutes. Simple add an annotation to yours methods and "voilá": it's done. Usage
As you can see, it uses a Symfony-like router to find the right code to execute. Moreover, it suports the use of patterns so some parts of request can be variables! Just add a InstallationThis library can be found on Packagist. We endorse that everything will work fine if you install this through Add in your
or in your bash
From any point, make available the following code to start:
If this script is available at http://example.com/api/v1/ (suposing you already have a router working previously) then the API router will understand things starting there: - http://example.com/api/v1/my/route - http://example.com/api/v1/route/with/me - http://example.com/api/v1/another/way/maybe/works If you are not using a router, but created a new directory to keep our code, remember to enable
This lib also uses a token system. You can activate it by creating a file named
The client will use this token to communicate with the API by adding its value to the key Docs & ContributionYou can also check the docs/ for futher information about the classes and stuff. All codes are well commented so fell free to go deep and help us get this even better. Profit! |