Advertisement
lockefox

Validate eveapi access

Jan 14th, 2014
2,998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. keyInfo = auth.account.APIKeyInfo()
  2.  
  3. keyType = keyInfo.key.type
  4. keyExpires = keyInfo.key.expires
  5. keyMask = keyInfo.key.accessMask
  6.  
  7. account_characters = {}
  8. if keyType == "Character":
  9.     for character in keyInfo.characters:
  10.         account_characters[character.characterName] = character.characterID
  11.  
  12. character_list_mask = 8 #can be dynamically fetched @ api.api.callList.calls
  13. if ((keyMask & character_list_mask) == character_list_mask) and (keyType == "Character"):
  14.     ####    Fetch character Sheet
  15. else:
  16.     throw Exception
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement