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
127 Stars 52 Forks BSD 2-Clause "Simplified" License 344 Commits 11 Opened issues

Description

Pokemon Go API PHP library

Services available

!
?

Need anything else?

Contributors list

# 377,565
PHP
Shell
grafana
prometh...
143 commits
# 562,688
PHP
34 commits
# 152,320
es2015
Python
protobu...
PHP
29 commits
# 602,244
PHP
23 commits
# 695,169
PHP
7 commits
# 285,705
Shell
C
Lua
ssl
1 commit
# 779,713
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.