Skip to content

Commit

Permalink
Stop fetching gym details (#3245)
Browse files Browse the repository at this point in the history
  • Loading branch information
elicwhite authored Aug 9, 2016
1 parent e73d302 commit 8203f36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
18 changes: 0 additions & 18 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from human_behaviour import sleep
from item_list import Item
from metrics import Metrics
from gym_cache import GymCache
from pokemongo_bot.event_handlers import LoggingHandler, SocketIoHandler
from pokemongo_bot.socketio_server.runner import SocketIoRunner
from pokemongo_bot.websocket_remote_control import WebsocketRemoteControl
Expand Down Expand Up @@ -62,7 +61,6 @@ def __init__(self, config):
)
self.item_list = json.load(open(os.path.join('data', 'items.json')))
self.metrics = Metrics(self)
self.gym_cache = GymCache(self)
self.latest_inventory = None
self.cell = None
self.recent_forts = [None] * config.forts_max_circle_size
Expand Down Expand Up @@ -496,22 +494,6 @@ def update_web_location(self, cells=[], lat=None, lng=None, alt=None):
location = self.position[0:2]
cells = self.find_close_cells(*location)

# insert detail info about gym to fort
for cell in cells:
if 'forts' in cell:
for fort in cell['forts']:
if fort.get('type') != 1:
response_gym_details = self.gym_cache.get(
gym_id=fort.get('id'),
player_latitude=lng,
player_longitude=lat,
gym_latitude=fort.get('latitude'),
gym_longitude=fort.get('longitude')
)
fort['gym_details'] = response_gym_details.get(
'responses', {}
).get('GET_GYM_DETAILS', None)

user_data_cells = "data/cells-%s.json" % self.config.username
with open(user_data_cells, 'w') as outfile:
json.dump(cells, outfile)
Expand Down
32 changes: 0 additions & 32 deletions pokemongo_bot/gym_cache.py

This file was deleted.

0 comments on commit 8203f36

Please sign in to comment.