MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / api_scan

Function api_scan

contrib/fake-pgo-api.py:166–179  ·  view source on GitHub ↗
(lat, lng)

Source from the content-addressed store, hash-verified

164
165@app.route('/scan/<lat>/<lng>')
166def api_scan(lat, lng):
167 location = (float(lat), float(lng))
168 cells = []
169 # for i in range(randint(60,70)):
170 for i in range(3):
171 cells.append({
172 'current_timestamp_ms': int(time() * 1000),
173 'forts': getForts(location),
174 's2_cell_id': uuid4(), # wrong, but also unused so it doesn't matter
175 'wild_pokemons': makeWildPokemon(location),
176 'catchable_pokemons': [], # unused
177 'nearby_pokemons': [] # unused
178 })
179 return jsonify({'responses': {'GET_MAP_OBJECTS': {'map_cells': cells}}})
180
181if __name__ == '__main__':
182 app.run(threaded=True, debug=args.debug, host=args.host, port=args.port)

Callers

nothing calls this directly

Calls 3

getFortsFunction · 0.85
makeWildPokemonFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected