darovi / pokephp
Pokeapi PHP Wrapper
Requires
- php: >=5.3.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is auto-updated.
Last update: 2023-05-08 20:35:19 UTC
README
A PHP Wrapper for the Pokemon API
Getting Started
To get started you must first install the package from composer.
composer require danrovito/pokephp
After composer installs the required package you can call the class by setting the following:
$api = new PokePHP\PokeApi;
This will give you the instance of the class to call the API functions. Below you will see examples for each endpoint. I utilize the $api
variable we created above to call each function.
Usage
You can search the data in the $api
instance by calling the search
method and passing a filter
with an optional value, just as you can still limit the results with the limit
method. To retrieve the data you must call the request method, which will return a json.
$response = $api->search(Filter::POKEMON_COLOR, 'red')->limit(5)->request();
License
pokephp is open-sourced software licensed under the MIT license
Bug Reporting and Feature Requests
Please add as much detail as possible regarding the submission of issues and feature requests
Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.