sjaakmoes / pokapi
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (v2.0.4) of this package.
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. Not finished at all so far.
Supports request signing.
Captcha
Pokapi can now solve captchas if you provide a Captcha-Solver. A class for AntiCaptcha.com is built in:
// 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.
You can implement your own resolvers by implementing the Solver
interface.
Hashing Server
Pokapi now supports the use of a Hashing Server, see Usage.
Requirements
- PHP 7.1+
- php-xxhash extension
- 64-bit PHP
- Hashing server if you want to use the latest version (0.57.2)
Installation
To install with Composer
composer require sjaakmoes/pokapi
Usage
// 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();