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
|
@ -11,14 +11,15 @@ __all__ = (
|
|||
'User',
|
||||
)
|
||||
|
||||
class APIOBJECT():
|
||||
class APIOBJECT:
|
||||
__slots__ = (
|
||||
'response',
|
||||
'_response',
|
||||
'_state'
|
||||
)
|
||||
|
||||
def __init__(self, response: dict, session: aiohttp.ClientSession) -> None:
|
||||
self.response = response
|
||||
self.state = session
|
||||
def __init__(self, response: dict[str, str | int], session: aiohttp.ClientSession) -> None:
|
||||
self._response = response
|
||||
self._state = session
|
||||
|
||||
|
||||
def __repr__(self) -> str:
|
||||
|
@ -26,12 +27,11 @@ class APIOBJECT():
|
|||
|
||||
class _BaseUser(APIOBJECT):
|
||||
__slots__ = (
|
||||
'reponse',
|
||||
'name',
|
||||
'id',
|
||||
)
|
||||
def __init__(self, response: dict, session: aiohttp.ClientSession) -> None:
|
||||
super().__init__(response, session=session)
|
||||
super().__init__(response, session)
|
||||
self.login = response.get('login')
|
||||
self.id = response.get('id')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue