Finish api fetching code

This commit is contained in:
cncfanatics
2010-09-08 19:44:50 +02:00
parent 08da8b0313
commit 03605b6b9d
3 changed files with 85 additions and 22 deletions

View File

@@ -79,3 +79,17 @@ class Character():
def delete(self, charID):
char = eos.db.getCharacter(charID)
eos.db.remove(char)
def charList(self, charID, userID, apiKey):
char = eos.db.getCharacter(charID)
char.apiID = userID
char.apiKey = apiKey
try:
return char.apiCharList()
except:
return None
def apiFetch(self, charID, charName):
char = eos.db.getCharacter(charID)
char.apiFetch(charName)
eos.db.commit()