tuttarealstep / pokegoapi-php
Api for pokemon go
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 10
Forks: 11
Open Issues: 9
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ~6.0
- vlucas/phpdotenv: ^2.3
This package is auto-updated.
Last update: 2025-01-08 20:37:55 UTC
README
Pokemon GO PHP API library
This is a conversion of this: PokeGOAPI-Java in php.
Build
- Clone the repo
git clone https://github.com/tuttarealstep/PokeGOAPI-PHP.git
- Move to the repo folder
cd PokeGOAPI-PHP
- Install the dependencies
composer install
Usage
How to use example:
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
For enable debug message go to src/PokemonGoAPI/Utils/Output.php
and change:
public $PK_GO_DEBUG = false;
To:
public $PK_GO_DEBUG = true;
Problems
- If you get NeedsBrowser error go to this link: DisplayUnlockCaptcha and proceed to Unlock captcha.
Links
Todo
- Implement PTC Login
- Test all things
- Check for issues
- Comment code
- Phpdoc
- Guide
Credits
- Grover-c13 for his java api (Beacuse I've converted his api in php and for the inspiration)
- jaspervdm for his protos
- NicklasWallgren because I've used for his updated protos
Legal
This project is in no way affiliated with, maintained, sponsored, authorized by Niantic, The Pokémon Company, Nintendo or any of its affiliates or subsidiaries. This is an independent and unofficial API for educational use ONLY. Using the project might be against the terms of service.