-
Notifications
You must be signed in to change notification settings - Fork 15
Development
Blabla let me figure out a way to preload data. Central to the whole project right now is that a single server instance will serve a single player. A server consists of both an Express server (facing the user) and a MITM proxy server that sits between the client (Android) and Pokemon Go (Niantic). It will try to gather as much data as possible from the user by listening in.
As a developer, you'll need the API to figure out what kind of data to expect.
Mostly, we base ourselves on https://github.com/AeonLucid/POGOProtos for object definitions and just keep that format. There are a few exceptions though, especially in the way things are structured. Below is a list of all calls you can perform.
Everything is formatted in JSON.
GET /api/player
Returns a rather large player object.
{
"location": {
"latitude": 51.16952133178711,
"longitude": 4.403346061706543,
"altitude": 4.841000080108643
},
"stats": {
"level": 16,
"experience": "129932",
"prev_level_xp": "100000",
"next_level_xp": "140000",
"km_walked": 84.73450469970703,
"pokemons_encountered": 400,
"unique_pokedex_entries": 56,
"pokemons_captured": 362,
"evolutions": 29,
"poke_stop_visits": 321,
"pokeballs_thrown": 825,
"eggs_hatched": 33,
"big_magikarp_caught": 2,
"battle_attack_won": 53,
"battle_attack_total": 54,
"battle_training_won": 14,
"battle_training_total": 24,
"prestige_raised_total": 2048,
"prestige_dropped_total": 68500,
"pokemon_deployed": 22,
"pokemon_caught_by_type": {
...
},
"small_rattata_caught": 4
}
}
GET /api/pokemon
Returns a list of POGOProtos.Data.PokemonData
[
{
"id": "15072875712224058545",
"pokemon_id": "RHYHORN",
"cp": 320,
"stamina": 73,
"stamina_max": 73,
"move_1": "MUD_SLAP_FAST",
"move_2": "HORN_ATTACK",
"height_m": 0.99407958984375,
"weight_kg": 119.5450668334961,
"individual_attack": 11,
"individual_defense": 11,
"individual_stamina": 13,
"pokeball": 1,
"captured_cell_id": "5171248925537992704",
"battles_attacked": 1,
"creation_time_ms": "1468351058335",
"from_fort": 1
},
...
]
GET /api/items
Returns an object where keys are POGOProtos.Inventory.ItemId and values are amounts.
{
"ITEM_INCUBATOR_BASIC_UNLIMITED": {
"count": 1,
"unseen": true
},
"ITEM_INCUBATOR_BASIC": {
"unseen": false
},
"ITEM_REVIVE": {
"count": 24,
"unseen": false
},
"ITEM_RAZZ_BERRY": {
"count": 37,
"unseen": false
},
"ITEM_LUCKY_EGG": {
"count": 2,
"unseen": false
},
"ITEM_POKE_BALL": {
"count": 36,
"unseen": false
},
"ITEM_GREAT_BALL": {
"count": 34,
"unseen": false
},
"ITEM_INCENSE_ORDINARY": {
"count": 3,
"unseen": false
},
"ITEM_POTION": {
"count": 31,
"unseen": false
},
"ITEM_SUPER_POTION": {
"count": 50,
"unseen": false
},
"ITEM_HYPER_POTION": {
"count": 33,
"unseen": false
},
"ITEM_TROY_DISK": {
"count": 3,
"unseen": false
}
}
POST /api/rpc/release
{
"id": pokemon_id
}
Returns
- 200: Success
- 500: Remote server failed (includes message)