def fort_details(bot, fort_id, latitude, longitude):
 if (fort_id not in FORT_CACHE):
  '\n        Lookup the fort details and cache the response for future use.\n        '
  request = bot.api.create_request()
  request.fort_details(fort_id=fort_id, latitude=latitude, longitude=longitude)
  try:
   response_dict = request.call()
   FORT_CACHE[fort_id] = response_dict['responses']['FORT_DETAILS']
  except Exception:
   pass
 return FORT_CACHE.get(fort_id, {})

def fort_details ( bot , fort_id , latitude , longitude ) : if ( fort_id not in FORT_CACHE ) : request = bot . api . create_request ( ) request . fort_details ( fort_id = fort_id , latitude = latitude , longitude = longitude ) try : response_dict = request . call ( ) FORT_CACHE [ fort_id ] = response_dict [ 'responses' ] [ 'FORT_DETAILS' ] except Exception : pass return FORT_CACHE . get ( fort_id , { } )
lookup fort metadata and serve from cache .