Move over all esi stuff to it's own class, which the esi service extends from. Also fix an issue in the EVE fittings browser where deleting a fit didn't actually remove it from the list of fits (due to that list being populated by the return data of ESI, which can be cached). More clean up.

This commit is contained in:
blitzmann
2018-05-12 13:53:56 -04:00
parent 0365f71c00
commit 5cc6b6c69c
4 changed files with 239 additions and 217 deletions

View File

@@ -32,23 +32,11 @@ class SsoCharacter(object):
self.accessToken = accessToken
self.refreshToken = refreshToken
self.accessTokenExpires = None
self.esi_client = None
@reconstructor
def init(self):
self.esi_client = None
def get_sso_data(self):
""" Little "helper" function to get formated data for esipy security
"""
return {
'access_token': self.accessToken,
'refresh_token': self.refreshToken,
'expires_in': (
self.accessTokenExpires - datetime.datetime.utcnow()
).total_seconds()
}
pass
def is_token_expired(self):
if self.accessTokenExpires is None: