pynintendoparental 2.2.0__py3-none-any.whl → 2.2.2__py3-none-any.whl
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/_version.py +1 -1
- pynintendoparental/api.py +8 -1
- pynintendoparental/device.py +2 -16
- {pynintendoparental-2.2.0.dist-info → pynintendoparental-2.2.2.dist-info}/METADATA +1 -1
- {pynintendoparental-2.2.0.dist-info → pynintendoparental-2.2.2.dist-info}/RECORD +8 -8
- {pynintendoparental-2.2.0.dist-info → pynintendoparental-2.2.2.dist-info}/WHEEL +0 -0
- {pynintendoparental-2.2.0.dist-info → pynintendoparental-2.2.2.dist-info}/licenses/LICENSE +0 -0
- {pynintendoparental-2.2.0.dist-info → pynintendoparental-2.2.2.dist-info}/top_level.txt +0 -0
pynintendoparental/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.2.
|
|
1
|
+
__version__ = "2.2.2"
|
pynintendoparental/api.py
CHANGED
|
@@ -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
|
pynintendoparental/device.py
CHANGED
|
@@ -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)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
pynintendoparental/__init__.py,sha256=gO3rH9gukrFoACVkdqj_liqcgtHxSZlitE0PrVQZGok,2334
|
|
2
|
-
pynintendoparental/_version.py,sha256=
|
|
3
|
-
pynintendoparental/api.py,sha256=
|
|
2
|
+
pynintendoparental/_version.py,sha256=toAYzE_ok1SiBE0AqAVdW0O8YCXCwcx0w4JATYQuJOg,22
|
|
3
|
+
pynintendoparental/api.py,sha256=Ko2TWFhUXkiTe7DOKm3gpVPfoskzJesGxFHChvhna8g,6963
|
|
4
4
|
pynintendoparental/application.py,sha256=4_38VBtoKddIXRRsegX9DB-BJ_CYIO4FhE1xC-VliOs,4961
|
|
5
5
|
pynintendoparental/authenticator.py,sha256=WPAEAUKmIymIiQUXILYt4B2_3UgYRKEVi6btJRwzjmM,430
|
|
6
6
|
pynintendoparental/const.py,sha256=owbzynb3eljPtvYr5vtg-B4UAIS5SGyumR8HDG6eB2Q,2201
|
|
7
|
-
pynintendoparental/device.py,sha256=
|
|
7
|
+
pynintendoparental/device.py,sha256=0KihypiPy2dcQUgsxAZw40GfxXF4lH8bOKKw0L3_6us,29222
|
|
8
8
|
pynintendoparental/enum.py,sha256=orYspYYuiBeIbb1Scgkj0m3Cn_rV-wLBr-ozG1v6azk,1169
|
|
9
9
|
pynintendoparental/exceptions.py,sha256=o1vpVIwa3CHyIxxqGjYX1hk2G5RMcZJN1T7lCA-fKzc,1308
|
|
10
10
|
pynintendoparental/player.py,sha256=Zh3vi0IdOHtn5KW0tT9JigB315ftjQ4uEQylF3D4LWs,2084
|
|
11
11
|
pynintendoparental/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
pynintendoparental/utils.py,sha256=gLMibsEOnKUZJgCQKF4Zk517fawZ3mBqMK6MS2g-Um0,199
|
|
13
|
-
pynintendoparental-2.2.
|
|
14
|
-
pynintendoparental-2.2.
|
|
15
|
-
pynintendoparental-2.2.
|
|
16
|
-
pynintendoparental-2.2.
|
|
17
|
-
pynintendoparental-2.2.
|
|
13
|
+
pynintendoparental-2.2.2.dist-info/licenses/LICENSE,sha256=zsxHgHVMnyWq121yND8zBl9Rl9H6EF2K9N51B2ZSm_k,1071
|
|
14
|
+
pynintendoparental-2.2.2.dist-info/METADATA,sha256=530WdzK2F4So0RTeTXc24gjiJ97WXtAYvVoMe47lAG4,2125
|
|
15
|
+
pynintendoparental-2.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
pynintendoparental-2.2.2.dist-info/top_level.txt,sha256=QQ5bAl-Ljso16P8KLf1NHrFmKk9jLT7bVJG_rVlIXWk,19
|
|
17
|
+
pynintendoparental-2.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|