-
Notifications
You must be signed in to change notification settings - Fork 445
Usage
tjado edited this page Jul 29, 2016
·
5 revisions
pokecli.py is a small pgoapi example script which shows the generic usage of pgoapi with few RPC calls.
usage: pokecli.py [-h] -a AUTH_SERVICE -u USERNAME -p PASSWORD -l LOCATION [-d] [-t]
optional arguments:
-h, --help show this help message and exit
-a AUTH_SERVICE, --auth_service AUTH_SERVICE Auth Service ('ptc' or 'google')
-u USERNAME, --username USERNAME Username
-p PASSWORD, --password PASSWORD Password
-l LOCATION, --location LOCATION Location
-d, --debug Debug Mode
-t, --test Only parse the specified location
Build and run container:
docker build -t pokecli .
docker run pokecli
Optionally create an alias:
alias pokecli='docker run pokecli'
All (known) RPC calls against the original Pokemon Go servers are listed in the RequestType Enum in the POGOProtos/Networking/Requests/RequestType.proto file. These can be executed over the name, e.g. the call for get_player is:
api = PGoApi()
...
api.get_player()
api.call()
The pgoapi will send this as a RPC request and tries to parse the response over a protobuf object with the same name (get_player) converted to CamelCase + 'Response'. In our example, it would be 'GetPlayerResponse'.
If a request needs parameters, they can be added as arguments and pgoapi will try to add them automatically to the request, e.g.:
*DownloadSettingsMessage.proto:*
message DownloadSettingsMessage {
optional string hash = 1;
}
*python:*
api = PGoApi()
...
api.download_settings(hash="4a2e9bc330dae60e7b74fc85b98868ab4700802e")
api.call()
- add_fort_modifier
- attack_gym
- catch_pokemon
- check_awarded_badges
- check_codename_available
- claim_codename
- collect_daily_bonus
- collect_daily_defender_bonus
- disk_encounter
- download_item_templates
- download_remote_config_version
- download_settings
- echo
- encounter
- encounter_tutorial_complete
- equip_badge
- evolve_pokemon
- fort_deploy_pokemon
- fort_details
- fort_recall_pokemon
- fort_search
- get_asset_digest
- get_download_urls
- get_gym_details
- get_hatched_eggs
- get_incense_pokemon
- get_inventory
- get_map_objects
- get_player
- get_player_profile
- get_suggested_codenames
- incense_encounter
- level_up_rewards
- mark_tutorial_complete
- nickname_pokemon
- player_update
- recycle_inventory_item
- release_pokemon
- set_avatar
- set_contact_settings
- set_favorite_pokemon
- set_player_team
- sfida_action_log
- start_gym_battle
- upgrade_pokemon
- use_incense
- use_item_capture
- use_item_egg_incubator
- use_item_gym
- use_item_potion
- use_item_revive
- use_item_xp_boost
buy_gem_packbuy_item_packdebug_delete_playerdebug_update_inventoryget_item_packitem_useload_spawn_pointssfida_actionsfida_capturesfida_certificationsfida_dowsersfida_registrationsfida_updatetrade_offertrade_responsetrade_resulttrade_searchuse_item_flee