PHP code example of sammyjo20 / pokeapi-sdk
1. Go to this page and download the library: Download sammyjo20/pokeapi-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sammyjo20 / pokeapi-sdk example snippets
use Pokeapi\Pokeapi;
use Pokeapi\Requests\GetAllPokemon;
$pokeapi = new Pokeapi();
$response = $pokeapi->send(new GetAllPokemon);
use Pokeapi\Pokeapi;
use Pokeapi\Requests\GetAllPokemon;
$pokeapi = new Pokeapi();
$paginator = $pokeapi->paginate(new GetAllPokemon);
foreach($paginator->items() as $item) {
// Handle result
}