tuttarealstep / pokegoapi-php
Pokemon Go API
dev-master
2016-08-03 14:44 UTC
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ~6.0
- vlucas/phpdotenv: ^2.3
This package is auto-updated.
Last update: 2024-09-08 19:56:44 UTC
README
Pokemon GO PHP API 库
这是从以下内容转换而来: PokeGOAPI-Java,用 PHP 实现的。
构建
- 克隆仓库
git clone https://github.com/tuttarealstep/PokeGOAPI-PHP.git
- 移动到仓库文件夹
cd PokeGOAPI-PHP
- 安装依赖
composer install
使用方法
如何使用示例
use PokemonGoAPI\Api\PokemonGoAPI; $PokemonGoAPILogin = (new \PokemonGoAPI\Auth\GoogleLogin())->login('username', 'password'); //Use Google for login and retrive token $PokemonGoAPILogin = (new \PokemonGoAPI\Auth\GoogleLogin())->loginWithGoogleToken($token); //or use existing token $PokemonGoAPI = new PokemonGoAPI($PokemonGoAPILogin); //Send token to the api echo $PokemonGoAPI->getPlayerProfile()->getUsername() . "\n"; //Print User Username
为了启用调试信息,前往 src/PokemonGoAPI/Utils/Output.php
并更改
public $PK_GO_DEBUG = false;
为
public $PK_GO_DEBUG = true;
问题
- 如果您遇到 NeedsBrowser 错误,请访问此链接: DisplayUnlockCaptcha 并继续解锁验证码。
链接
待办事项
- 实现 PTC 登录
- 测试所有功能
- 检查问题
- 代码注释
- Phpdoc
- 指南
致谢
- Grover-c13 对于他的 Java API(因为我已经将其 API 转换为 PHP,并从中获得灵感)
- jaspervdm 对于他的 protos
- NicklasWallgren 因为我已经使用了他的更新过的 protos
法律声明
该项目与 Niantic、宝可梦公司、任天堂及其附属公司或子公司没有任何关联、维护、赞助或授权。这是一个独立的非官方 API,仅用于教育目的。使用此项目可能违反服务条款。