pynintendoparental 2.2.1__py3-none-any.whl → 2.2.3__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.
@@ -1 +1 @@
1
- __version__ = "2.2.1"
1
+ __version__ = "2.2.3"
pynintendoparental/api.py CHANGED
@@ -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
- **parental_control_setting,
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": play_timer_regulations,
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pynintendoparental
3
- Version: 2.2.1
3
+ Version: 2.2.3
4
4
  Summary: A Python module to interact with Nintendo Parental Controls
5
5
  Home-page: http://github.com/pantherale0/pynintendoparental
6
6
  Author: pantherale0
@@ -1,6 +1,6 @@
1
1
  pynintendoparental/__init__.py,sha256=gO3rH9gukrFoACVkdqj_liqcgtHxSZlitE0PrVQZGok,2334
2
- pynintendoparental/_version.py,sha256=4dqvKTDgbqeyzbWj6hYiNdzxsI8j1YOKSLM8vF6a0j4,22
3
- pynintendoparental/api.py,sha256=DAbpkYWFcSXLpAgOUjvWOYg0y0yD02kggV9DuBdhMhU,6647
2
+ pynintendoparental/_version.py,sha256=3pvG1dVJuHEcdu38cc8mGwpb57ZUjsnbAe_LVURnTPQ,22
3
+ pynintendoparental/api.py,sha256=Q3Ll9-OPCMVzJAMk5jVxPiwCC_6MjyGuNI5bsd6nMWw,7352
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
@@ -10,8 +10,8 @@ pynintendoparental/exceptions.py,sha256=o1vpVIwa3CHyIxxqGjYX1hk2G5RMcZJN1T7lCA-f
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.1.dist-info/licenses/LICENSE,sha256=zsxHgHVMnyWq121yND8zBl9Rl9H6EF2K9N51B2ZSm_k,1071
14
- pynintendoparental-2.2.1.dist-info/METADATA,sha256=2jpLNDsIokGEuww-Kub-B8U6affC2VgfSM9CUL3a2is,2125
15
- pynintendoparental-2.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- pynintendoparental-2.2.1.dist-info/top_level.txt,sha256=QQ5bAl-Ljso16P8KLf1NHrFmKk9jLT7bVJG_rVlIXWk,19
17
- pynintendoparental-2.2.1.dist-info/RECORD,,
13
+ pynintendoparental-2.2.3.dist-info/licenses/LICENSE,sha256=zsxHgHVMnyWq121yND8zBl9Rl9H6EF2K9N51B2ZSm_k,1071
14
+ pynintendoparental-2.2.3.dist-info/METADATA,sha256=gkGtFEj5YO7_qVy9jkEIsRtt7xSfdxY8HFJEHQ8ZrII,2125
15
+ pynintendoparental-2.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ pynintendoparental-2.2.3.dist-info/top_level.txt,sha256=QQ5bAl-Ljso16P8KLf1NHrFmKk9jLT7bVJG_rVlIXWk,19
17
+ pynintendoparental-2.2.3.dist-info/RECORD,,