Can now login to SSO from pyfa, which completes basic integration. This is very crude, will be refined.

This commit is contained in:
blitzmann
2015-10-19 20:09:39 -04:00
parent 972df6cad3
commit 8151debfe1
4 changed files with 61 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import eos.db
from eos.types import Crest as CrestUser
import config
class Crest():
@@ -12,7 +13,6 @@ class Crest():
return cls._instance
def __init__(self):
pass
def getCrestCharacters(self):
@@ -29,6 +29,12 @@ class Crest():
def postFitting(self, charID, json):
char = self.getCrestCharacter(charID)
char.auth()
print char.eve.token
res = char.eve._session.post('https://api-sisi.testeveonline.com/characters/%d/fittings/'%char.ID, data=json)
return res
def newChar(self, connection):
connection()
info = connection.whoami()
char = CrestUser(info['CharacterName'], info['CharacterID'], connection.refresh_token)
eos.db.save(char)