Need help with PokemonGoAPI-PHP?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

NicklasWallgren
125 Stars 52 Forks BSD 2-Clause "Simplified" License 344 Commits 13 Opened issues

Description

Pokemon Go API PHP library

Services available

!
?

Need anything else?

Contributors list

# 371,154
PHP
grafana
prometh...
Kuberne...
143 commits
# 568,747
PHP
34 commits
# 155,542
es2015
Python
protobu...
PHP
29 commits
# 607,764
PHP
23 commits
# 695,705
PHP
7 commits
# 236,175
Shell
C
Lua
ssl
1 commit
# 777,433
PHP
1 commit

PokemonGoAPI-PHP

Total Downloads PHP7 Ready

Pokemon GO PHP API library

Install

Run the command

composer require nicklasw/pkm-go-api
.

Usage

EG: ```php // Create the authentication config $config = new Config(); $config->setProvider(Factory::PROVIDERPTC); $config->setUser('INSERTUSER'); $config->setPassword('INSERT_PASSWORD');

// Create the authentication manager $manager = Factory::create($config);

// Add a event listener, $manager->addListener(function ($event, $value) { if ($event === Manager::EVENTACCESSTOKEN) { /** @var AccessToken $accessToken */ $accessToken = $value;

    // Persist the access token in session storage, cache or whatever.
}

});

// Initialize the pokemon go application $application = new ApplicationKernel($manager);

// Retrieve the pokemon go api instance $pokemonGoApi = $application->getPokemonGoApi();

// Retrieve the inventory $inventory = $pokemonGoApi->getInventory();

// Retrieve the poke bank $pokeBank = $inventory->getPokeBank();

// Retrieve a pokemon of type pidgey $pokemon = $pokeBank->getPokemonsByType(PokemonId::PIDGEY)->first();

// Transfer / Release the pokemon (Send to the meat grinder) $pokemon->transfer(); ```

TODO

  • Implement the Map API
  • Improve logging

Contributors

Testing

$ composer test

Slack Chat

We use Slack for community discussions. You can find our team here: https://pokemongoapi-php.slack.com

Credits

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.