sammyjo20/pokeapi-sdk
最新稳定版本:v2.0.0
Composer 安装命令:
composer require sammyjo20/pokeapi-sdk
包简介
Unofficial PHP SDK for Pokeapi
README 文档
README
This is an example PHP SDK built with Saloon v3.
Available Requests
Pokeapi\Requests\GetAllPokemonPokeapi\Requests\GetAllItems
Installation
Use Composer to install this SDK
composer require sammyjo20/pokeapi-sdk
Usage
Simply call the send method with the request class you would like to send. Once sent, a PokeapiResponse is returned.
<?php use Pokeapi\Pokeapi; use Pokeapi\Requests\GetAllPokemon; $pokeapi = new Pokeapi(); $response = $pokeapi->send(new GetAllPokemon);
Paginated Results
You may prefer to retrieve all the results from the paginated requests by using the paginate method on the SDK.
<?php use Pokeapi\Pokeapi; use Pokeapi\Requests\GetAllPokemon; $pokeapi = new Pokeapi(); $paginator = $pokeapi->paginate(new GetAllPokemon); foreach($paginator->items() as $item) { // Handle result }
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-03