mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-16 22:15:09 +00:00
Renamed session to state
This commit is contained in:
parent
b4045c70bd
commit
d32ec86671
1 changed files with 9 additions and 9 deletions
|
@ -8,17 +8,18 @@ import aiohttp
|
||||||
from . import http
|
from . import http
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'User',
|
'User',
|
||||||
)
|
)
|
||||||
|
|
||||||
class APIOBJECT():
|
class APIOBJECT:
|
||||||
__slots__ = (
|
__slots__ = (
|
||||||
'response',
|
'_response',
|
||||||
|
'_state'
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, response: dict, session: aiohttp.ClientSession) -> None:
|
def __init__(self, response: dict[str, str | int], session: aiohttp.ClientSession) -> None:
|
||||||
self.response = response
|
self._response = response
|
||||||
self.state = session
|
self._state = session
|
||||||
|
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
|
@ -26,12 +27,11 @@ class APIOBJECT():
|
||||||
|
|
||||||
class _BaseUser(APIOBJECT):
|
class _BaseUser(APIOBJECT):
|
||||||
__slots__ = (
|
__slots__ = (
|
||||||
'reponse',
|
|
||||||
'name',
|
'name',
|
||||||
'id',
|
'id',
|
||||||
)
|
)
|
||||||
def __init__(self, response: dict, session: aiohttp.ClientSession) -> None:
|
def __init__(self, response: dict, session: aiohttp.ClientSession) -> None:
|
||||||
super().__init__(response, session=session)
|
super().__init__(response, session)
|
||||||
self.login = response.get('login')
|
self.login = response.get('login')
|
||||||
self.id = response.get('id')
|
self.id = response.get('id')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue