sjaakmoes / pokapi
此包已被废弃,不再维护。未建议替代包。
此包最新版本(v2.0.4)没有可用的许可信息。
v2.0.4
2017-03-08 18:06 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.2
- jaspervdm/pogoprotos-php: dev-master
- nicklasw/s2-geometry-library-php: dev-master
- pogo-php/pogoencrypt-php: ^1.0
- protobuf-php/google-protobuf-proto: dev-master
- psr/log: ^1.0
This package is not auto-updated.
Last update: 2020-01-24 17:01:52 UTC
README
Pokemon API PHP。迄今为止尚未完成。
支持请求签名。
验证码
Pokapi 现在可以解决验证码,如果您提供验证码解决方案。内置了 AntiCaptcha.com 的类
// Solver $solver = new AntiCaptcha("your_api_key_here", "PoGo_site_key"); $api->setCaptchaSolver($solver); // The checkChallenge function will now try to resolve a possible captcha automatically with the provided resolver. $result = $api->checkChallenge(); // FALSE on no capture, TRUE on resolved. Exception on failure to resolve.
您可以通过实现 Solver
接口来实现自己的解析器。
哈希服务器
Pokapi 现在支持使用哈希服务器,请参阅用法。
要求
- PHP 7.1+
- php-xxhash 扩展
- 64 位 PHP
- 如果您想使用最新版本(0.57.2),则需要哈希服务器
安装
使用 Composer 安装
composer require sjaakmoes/pokapi
用法
// PTC Account $authentication = new TrainersClub('username', 'password'); $position = new Position($latitude, $longitude, $altitude); $deviceInfo = DeviceInfo::getDefault($uniqueDeviceId); // Version $version = new Version\Latest(); // 0.57.2 - You need a hashing server for this one. $version = new Version\Legacy(); // 0.45.0 // Pogodev.io hashing server $hashProvider = new Hashing\Pogodev("your_api_key_here"); $api = new API($version, $authentication, $position, $deviceInfo, $hashProvider); // Initializes like the real client $api->initialize(); // Accept ToS $api->acceptTerms(); // Execute operation $getPlayerResponse = $api->getPlayerData(); $mapObjects = $api->getMapObjects();