mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-12 18:16:24 +01:00
Merge branch 'master' of https://github.com/Adarnof/allianceauth into sso_registration
# Conflicts: # alliance_auth/__init__.py # corputils/models.py # corputils/views.py # eveonline/tasks.py # fleetactivitytracking/views.py # hrapplications/admin.py # requirements.txt
This commit is contained in:
@@ -6,6 +6,9 @@ import json
|
||||
from bravado.exception import HTTPNotFound, HTTPUnprocessableEntity
|
||||
import evelink
|
||||
import logging
|
||||
import os
|
||||
|
||||
SWAGGER_SPEC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'swagger.json')
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -228,7 +231,7 @@ class EveProvider(object):
|
||||
@python_2_unicode_compatible
|
||||
class EveSwaggerProvider(EveProvider):
|
||||
def __init__(self, token=None, adapter=None):
|
||||
self.client = esi_client_factory(token=token, Alliance='v1', Character='v4', Corporation='v2', Universe='v2')
|
||||
self.client = esi_client_factory(token=token, spec_file=SWAGGER_SPEC_PATH)
|
||||
self.adapter = adapter or self
|
||||
|
||||
def __str__(self):
|
||||
@@ -244,7 +247,7 @@ class EveSwaggerProvider(EveProvider):
|
||||
data['alliance_name'],
|
||||
data['ticker'],
|
||||
corps,
|
||||
data['executor_corporation_id'],
|
||||
data['executor_corp'],
|
||||
)
|
||||
return model
|
||||
except HTTPNotFound:
|
||||
|
||||
1
eveonline/swagger.json
Normal file
1
eveonline/swagger.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
# Create your tests here.
|
||||
Reference in New Issue
Block a user