pynintendoparental 2.2.1__tar.gz → 2.2.3__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.1 → pynintendoparental-2.2.3}/PKG-INFO +1 -1
- pynintendoparental-2.2.3/pynintendoparental/_version.py +1 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/api.py +19 -2
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/PKG-INFO +1 -1
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_api.py +14 -2
- pynintendoparental-2.2.1/pynintendoparental/_version.py +0 -1
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/LICENSE +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/README.md +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/__init__.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/application.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/authenticator.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/const.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/device.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/enum.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/exceptions.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/player.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/py.typed +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental/utils.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/SOURCES.txt +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/dependency_links.txt +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/requires.txt +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/top_level.txt +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pyproject.toml +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/setup.cfg +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/setup.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_applications.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_device.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_enum.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_init.py +0 -0
- {pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/tests/test_player.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.3"
|
|
@@ -151,9 +151,18 @@ 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
|
+
"whitelistedApplicationList",
|
|
156
|
+
"functionalRestrictionLevel",
|
|
157
|
+
)
|
|
154
158
|
settings = {
|
|
155
159
|
"deviceId": device_id,
|
|
156
|
-
|
|
160
|
+
"customSettings": parental_control_setting.get("customSettings", {}),
|
|
161
|
+
"parentalControlSettingEtag": parental_control_setting.get("etag"),
|
|
162
|
+
"vrRestrictionEtag": parental_control_setting.get("customSettings", {}).get(
|
|
163
|
+
"vrRestrictionEtag"
|
|
164
|
+
),
|
|
165
|
+
**{key: parental_control_setting.get(key) for key in allowed_keys},
|
|
157
166
|
}
|
|
158
167
|
return await self.send_request(
|
|
159
168
|
endpoint="update_restriction_level", body=settings
|
|
@@ -163,9 +172,17 @@ class Api:
|
|
|
163
172
|
self, device_id: str, play_timer_regulations: dict
|
|
164
173
|
) -> dict:
|
|
165
174
|
"""Update device play timer settings."""
|
|
175
|
+
allowed_ptr_keys = (
|
|
176
|
+
"timerMode",
|
|
177
|
+
"restrictionMode",
|
|
178
|
+
"dailyRegulations",
|
|
179
|
+
"eachDayOfTheWeekRegulations",
|
|
180
|
+
)
|
|
166
181
|
settings = {
|
|
167
182
|
"deviceId": device_id,
|
|
168
|
-
"playTimerRegulations":
|
|
183
|
+
"playTimerRegulations": {
|
|
184
|
+
key: play_timer_regulations.get(key) for key in allowed_ptr_keys
|
|
185
|
+
},
|
|
169
186
|
}
|
|
170
187
|
return await self.send_request(endpoint="update_play_timer", body=settings)
|
|
171
188
|
|
|
@@ -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)
|
|
@@ -192,7 +199,12 @@ async def test_api_methods(mock_authenticator: Authenticator):
|
|
|
192
199
|
endpoint="update_play_timer",
|
|
193
200
|
body={
|
|
194
201
|
"deviceId": "DEVICE_ID",
|
|
195
|
-
"playTimerRegulations": {
|
|
202
|
+
"playTimerRegulations": {
|
|
203
|
+
"timerMode": None,
|
|
204
|
+
"restrictionMode": None,
|
|
205
|
+
"dailyRegulations": None,
|
|
206
|
+
"eachDayOfTheWeekRegulations": None,
|
|
207
|
+
},
|
|
196
208
|
},
|
|
197
209
|
)
|
|
198
210
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.1"
|
|
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
|
|
File without changes
|
{pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/pynintendoparental.egg-info/requires.txt
RENAMED
|
File without changes
|
{pynintendoparental-2.2.1 → pynintendoparental-2.2.3}/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
|