python-picnic-api2 1.3.3__py3-none-any.whl → 1.3.4__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.
@@ -94,8 +94,8 @@ class PicnicAPI:
94
94
  if not isinstance(response, dict):
95
95
  return False
96
96
 
97
- error_code = response.get("error", {}).get("code")
98
- return error_code == "TWO_FACTOR_AUTHENTICATION_REQUIRED"
97
+ return "second_factor_authentication_required" in response \
98
+ and response["second_factor_authentication_required"] is True
99
99
 
100
100
  def login(self, username: str, password: str):
101
101
  path = "/user/login"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-picnic-api2
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Project-URL: homepage, https://github.com/codesalatdev/python-picnic-api
5
5
  Project-URL: repository, https://github.com/codesalatdev/python-picnic-api
6
6
  Author-email: Mike Brink <mjh.brink@icloud.com>, CodeSalat <pypi@codesalat.dev>
@@ -0,0 +1,8 @@
1
+ python_picnic_api2/__init__.py,sha256=_yT2GUMnhnNIGlYDzBxerDtlN08PzUOG00mhNCoPlGU,229
2
+ python_picnic_api2/client.py,sha256=Bxp4WrABcGL7lheDsJRu0gSabq7AcTdsADGuikFL0bI,10804
3
+ python_picnic_api2/helper.py,sha256=_cHhC1YCzZj7FlnR5tdvu825UOB5etcIdm23lezrw8Y,5022
4
+ python_picnic_api2/session.py,sha256=2nhlyJ2MXR1yHQRxw85B-KXF4zt8L5__KrI-T_VvURg,2388
5
+ python_picnic_api2-1.3.4.dist-info/METADATA,sha256=FOrKfeXQ9L110lcNOaX7oCHJvcquZyj4D3WrYyU-Y6c,3370
6
+ python_picnic_api2-1.3.4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
7
+ python_picnic_api2-1.3.4.dist-info/licenses/LICENSE.md,sha256=CUvt2ilcBwKAfRAnoA4RNPTLcdUj3En21LPK9YkFMGg,11358
8
+ python_picnic_api2-1.3.4.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- python_picnic_api2/__init__.py,sha256=_yT2GUMnhnNIGlYDzBxerDtlN08PzUOG00mhNCoPlGU,229
2
- python_picnic_api2/client.py,sha256=_wPIYeQpNt5RF65YiuAQK_a2zwIGhbS_iJQOGdSWc_o,10790
3
- python_picnic_api2/helper.py,sha256=_cHhC1YCzZj7FlnR5tdvu825UOB5etcIdm23lezrw8Y,5022
4
- python_picnic_api2/session.py,sha256=2nhlyJ2MXR1yHQRxw85B-KXF4zt8L5__KrI-T_VvURg,2388
5
- python_picnic_api2-1.3.3.dist-info/METADATA,sha256=rEXCWg6U76TgFiukUSaO8JoPVdkz6TnFOPm6o7Vpvhs,3370
6
- python_picnic_api2-1.3.3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
7
- python_picnic_api2-1.3.3.dist-info/licenses/LICENSE.md,sha256=CUvt2ilcBwKAfRAnoA4RNPTLcdUj3En21LPK9YkFMGg,11358
8
- python_picnic_api2-1.3.3.dist-info/RECORD,,