mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-10 04:50:16 +02:00
decouple srp provider from eveonline
This commit is contained in:
parent
2054a76353
commit
44ac3a9ff2
@ -5,7 +5,7 @@ import requests
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
from allianceauth import NAME
|
from allianceauth import NAME
|
||||||
from allianceauth.eveonline.providers import provider
|
from allianceauth.srp.providers import esi
|
||||||
|
|
||||||
from .models import SrpUserRequest
|
from .models import SrpUserRequest
|
||||||
|
|
||||||
@ -32,8 +32,7 @@ class SRPManager:
|
|||||||
if result:
|
if result:
|
||||||
killmail_id = result['killmail_id']
|
killmail_id = result['killmail_id']
|
||||||
killmail_hash = result['zkb']['hash']
|
killmail_hash = result['zkb']['hash']
|
||||||
c = provider.client
|
km = esi.client.Killmails.get_killmails_killmail_id_killmail_hash(
|
||||||
km = c.Killmails.get_killmails_killmail_id_killmail_hash(
|
|
||||||
killmail_id=killmail_id,
|
killmail_id=killmail_id,
|
||||||
killmail_hash=killmail_hash
|
killmail_hash=killmail_hash
|
||||||
).result()
|
).result()
|
||||||
|
11
allianceauth/srp/providers.py
Normal file
11
allianceauth/srp/providers.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import os
|
||||||
|
from esi.clients import EsiClientProvider
|
||||||
|
|
||||||
|
from allianceauth import __version__
|
||||||
|
|
||||||
|
SWAGGER_SPEC = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'swagger.json')
|
||||||
|
|
||||||
|
esi = EsiClientProvider(
|
||||||
|
spec_file=SWAGGER_SPEC,
|
||||||
|
app_info_text=("allianceauth v" + __version__)
|
||||||
|
)
|
1
allianceauth/srp/swagger.json
Normal file
1
allianceauth/srp/swagger.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user