Added Automatic Ship and ISK Fields

This commit is contained in:
orbitroom
2016-03-23 01:40:46 -04:00
parent 376bf60421
commit faf5c473d8
4 changed files with 11 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ class srpManager():
str = (killboard_link)
set = '0123456789'
kill_id = ''.join([c for c in str if c in set])
return kill_id
@staticmethod
def get_kill_data (kill_id):
@@ -28,6 +29,7 @@ class srpManager():
logger.debug("Ship type for kill ID %s is determined to be %s" % (kill_id, ship_type))
ship_value = result['zkb']['totalValue']
logger.debug("total loss value for kill id %s is %s" %(kill_id, ship_value))
return (ship_type, ship_value)
else:
raise ValueError("Invalid Kill ID")
@@ -42,6 +44,7 @@ class srpManager():
if result:
ship_name = result['typeName']
logger.debug("ship type %s determined to be %s" % (ship_type, ship_name))
return ship_name
else:
logger.info("ship type %s is invalid please try again" % ship_type)