mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 01:22:19 +03:00
companion: Fix class Session
docstring
This is *not* only for the Frontier oAuth2 authn, it's also for the actual CAPI queries.
This commit is contained in:
parent
e0f3787a31
commit
7339cc59ed
@ -464,7 +464,7 @@ class Auth(object):
|
||||
|
||||
|
||||
class Session(object):
|
||||
"""Methods for handling an oAuth2 session."""
|
||||
"""Methods for handling Frontier Auth and CAPI queries."""
|
||||
|
||||
STATE_INIT, STATE_AUTH, STATE_OK = list(range(3))
|
||||
|
||||
@ -553,7 +553,7 @@ class Session(object):
|
||||
self.session.headers['User-Agent'] = USER_AGENT
|
||||
self.state = Session.STATE_OK
|
||||
|
||||
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001
|
||||
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001, C901
|
||||
"""Perform a query against the specified CAPI endpoint."""
|
||||
logger.trace_if('capi.query', f'Performing query for endpoint "{endpoint}"')
|
||||
if self.state == Session.STATE_INIT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user