pynintendoparental 0.7.1__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/PKG-INFO +1 -1
- pynintendoparental-0.7.2/pynintendoparental/_version.py +1 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/authenticator/__init__.py +11 -8
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/PKG-INFO +1 -1
- pynintendoparental-0.7.1/pynintendoparental/_version.py +0 -1
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/LICENSE +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/README.md +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/__init__.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/api.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/application.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/authenticator/const.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/const.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/device.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/enum.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/exceptions.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/player.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/py.typed +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/utils.py +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/SOURCES.txt +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/dependency_links.txt +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/requires.txt +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/top_level.txt +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pyproject.toml +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/setup.cfg +0 -0
- {pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.7.2"
|
{pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/authenticator/__init__.py
RENAMED
|
@@ -63,7 +63,7 @@ class Authenticator:
|
|
|
63
63
|
self,
|
|
64
64
|
session_token = None,
|
|
65
65
|
auth_code_verifier = None,
|
|
66
|
-
|
|
66
|
+
client_session: aiohttp.ClientSession = None
|
|
67
67
|
):
|
|
68
68
|
"""Basic init."""
|
|
69
69
|
_LOGGER.debug(">> Init authenticator.")
|
|
@@ -77,9 +77,9 @@ class Authenticator:
|
|
|
77
77
|
self._id_token: str = None
|
|
78
78
|
self._session_token: str = session_token
|
|
79
79
|
self.login_url: str = None
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
self.client_session: aiohttp.ClientSession =
|
|
80
|
+
if client_session is None:
|
|
81
|
+
client_session = aiohttp.ClientSession()
|
|
82
|
+
self.client_session: aiohttp.ClientSession = client_session
|
|
83
83
|
|
|
84
84
|
@property
|
|
85
85
|
def get_session_token(self) -> str:
|
|
@@ -182,11 +182,13 @@ class Authenticator:
|
|
|
182
182
|
self.account = account["json"]
|
|
183
183
|
|
|
184
184
|
@classmethod
|
|
185
|
-
def generate_login(
|
|
185
|
+
def generate_login(
|
|
186
|
+
cls,
|
|
187
|
+
client_session: aiohttp.ClientSession | None = None) -> 'Authenticator':
|
|
186
188
|
"""Starts configuration of the authenticator."""
|
|
187
189
|
verifier = _rand()
|
|
188
190
|
|
|
189
|
-
auth = cls(auth_code_verifier=verifier)
|
|
191
|
+
auth = cls(auth_code_verifier=verifier, client_session=client_session)
|
|
190
192
|
|
|
191
193
|
query = {
|
|
192
194
|
"client_id": CLIENT_ID,
|
|
@@ -207,10 +209,11 @@ class Authenticator:
|
|
|
207
209
|
async def complete_login(cls,
|
|
208
210
|
auth: Authenticator | None,
|
|
209
211
|
response_token: str,
|
|
210
|
-
is_session_token: bool=False
|
|
212
|
+
is_session_token: bool=False,
|
|
213
|
+
client_session: aiohttp.ClientSession | None = None) -> Authenticator:
|
|
211
214
|
"""Creates and logs into Nintendo APIs"""
|
|
212
215
|
if is_session_token:
|
|
213
|
-
auth = cls(session_token=response_token)
|
|
216
|
+
auth = cls(session_token=response_token, client_session=client_session)
|
|
214
217
|
await auth.perform_refresh()
|
|
215
218
|
else:
|
|
216
219
|
response_token = _parse_response_token(response_token)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.7.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental/authenticator/const.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/requires.txt
RENAMED
|
File without changes
|
{pynintendoparental-0.7.1 → pynintendoparental-0.7.2}/pynintendoparental.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|