pynintendoparental 2.2.0__tar.gz → 2.2.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-2.2.0 → pynintendoparental-2.2.2}/PKG-INFO +1 -1
- pynintendoparental-2.2.2/pynintendoparental/_version.py +1 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/api.py +8 -1
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/device.py +2 -16
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/PKG-INFO +1 -1
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_api.py +8 -1
- pynintendoparental-2.2.0/pynintendoparental/_version.py +0 -1
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/LICENSE +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/README.md +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/__init__.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/application.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/authenticator.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/const.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/enum.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/exceptions.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/player.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/py.typed +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental/utils.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/SOURCES.txt +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/dependency_links.txt +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/requires.txt +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/top_level.txt +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pyproject.toml +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/setup.cfg +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/setup.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_applications.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_device.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_enum.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_init.py +0 -0
- {pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/tests/test_player.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.2"
|
|
@@ -151,9 +151,16 @@ class Api:
|
|
|
151
151
|
self, device_id: str, parental_control_setting: dict
|
|
152
152
|
) -> dict:
|
|
153
153
|
"""Update device restriction level."""
|
|
154
|
+
allowed_keys = (
|
|
155
|
+
"vrRestrictionEtag",
|
|
156
|
+
"whitelistedApplicationList",
|
|
157
|
+
"functionalRestrictionLevel",
|
|
158
|
+
"parentalControlSettingEtag",
|
|
159
|
+
)
|
|
154
160
|
settings = {
|
|
155
161
|
"deviceId": device_id,
|
|
156
|
-
|
|
162
|
+
"customSettings": parental_control_setting.get("customSettings", {}),
|
|
163
|
+
**{key: parental_control_setting.get(key) for key in allowed_keys},
|
|
157
164
|
}
|
|
158
165
|
return await self.send_request(
|
|
159
166
|
endpoint="update_restriction_level", body=settings
|
|
@@ -416,22 +416,8 @@ class Device:
|
|
|
416
416
|
"""Parse a parental control setting request response."""
|
|
417
417
|
_LOGGER.debug(">> Device._parse_parental_control_setting()")
|
|
418
418
|
self.parental_control_settings = pcs["parentalControlSetting"]
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
if (
|
|
422
|
-
"bedtimeStartingTime"
|
|
423
|
-
in self.parental_control_settings["playTimerRegulations"]
|
|
424
|
-
):
|
|
425
|
-
if (
|
|
426
|
-
self.parental_control_settings["playTimerRegulations"]
|
|
427
|
-
.get("bedtimeStartingTime", {})
|
|
428
|
-
.get("hour", 0)
|
|
429
|
-
== 0
|
|
430
|
-
):
|
|
431
|
-
self.parental_control_settings["playTimerRegulations"].pop(
|
|
432
|
-
"bedtimeStartingTime"
|
|
433
|
-
)
|
|
434
|
-
|
|
419
|
+
self.parental_control_settings["playTimerRegulations"].pop("bedtimeStartingTime", None)
|
|
420
|
+
self.parental_control_settings["playTimerRegulations"].pop("bedtimeEndingTime", None)
|
|
435
421
|
self.forced_termination_mode = self.parental_control_settings[
|
|
436
422
|
"playTimerRegulations"
|
|
437
423
|
]["restrictionMode"] == str(RestrictionMode.FORCED_TERMINATION)
|
|
@@ -172,7 +172,14 @@ async def test_api_methods(mock_authenticator: Authenticator):
|
|
|
172
172
|
await api.async_update_restriction_level("DEVICE_ID", {"some": "setting"})
|
|
173
173
|
api.send_request.assert_called_with(
|
|
174
174
|
endpoint="update_restriction_level",
|
|
175
|
-
body={
|
|
175
|
+
body={
|
|
176
|
+
"deviceId": "DEVICE_ID",
|
|
177
|
+
"customSettings": {},
|
|
178
|
+
"vrRestrictionEtag": None,
|
|
179
|
+
"whitelistedApplicationList": None,
|
|
180
|
+
"functionalRestrictionLevel": None,
|
|
181
|
+
"parentalControlSettingEtag": None
|
|
182
|
+
},
|
|
176
183
|
)
|
|
177
184
|
|
|
178
185
|
await api.async_update_extra_playing_time("DEVICE_ID", -1)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/requires.txt
RENAMED
|
File without changes
|
{pynintendoparental-2.2.0 → pynintendoparental-2.2.2}/pynintendoparental.egg-info/top_level.txt
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
|
|
File without changes
|