python-picnic-api2 2.0.0__py3-none-any.whl → 2.0.1__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.
- python_picnic_api2/__init__.py +1 -1
- python_picnic_api2/client.py +6 -4
- {python_picnic_api2-2.0.0.dist-info → python_picnic_api2-2.0.1.dist-info}/METADATA +2 -2
- {python_picnic_api2-2.0.0.dist-info → python_picnic_api2-2.0.1.dist-info}/RECORD +6 -6
- {python_picnic_api2-2.0.0.dist-info → python_picnic_api2-2.0.1.dist-info}/WHEEL +0 -0
- {python_picnic_api2-2.0.0.dist-info → python_picnic_api2-2.0.1.dist-info}/licenses/LICENSE.md +0 -0
python_picnic_api2/__init__.py
CHANGED
python_picnic_api2/client.py
CHANGED
|
@@ -176,7 +176,7 @@ class PicnicAPI:
|
|
|
176
176
|
return SearchResult.from_page(raw_results)
|
|
177
177
|
|
|
178
178
|
def get_cart(self) -> Cart:
|
|
179
|
-
return Cart.from_api(self._get("/cart"))
|
|
179
|
+
return Cart.from_api(self._get("/cart", add_picnic_headers=True))
|
|
180
180
|
|
|
181
181
|
def get_article(self, article_id: str, add_category=False) -> Article | None:
|
|
182
182
|
path = f"/pages/product-details-page-root?id={article_id}" + \
|
|
@@ -212,14 +212,16 @@ class PicnicAPI:
|
|
|
212
212
|
|
|
213
213
|
def add_product(self, product_id: str, count: int = 1) -> Cart:
|
|
214
214
|
data = {"product_id": product_id, "count": count}
|
|
215
|
-
return Cart.from_api(self._post("/cart/add_product", data
|
|
215
|
+
return Cart.from_api(self._post("/cart/add_product", data,
|
|
216
|
+
add_picnic_headers=True))
|
|
216
217
|
|
|
217
218
|
def remove_product(self, product_id: str, count: int = 1) -> Cart:
|
|
218
219
|
data = {"product_id": product_id, "count": count}
|
|
219
|
-
return Cart.from_api(self._post("/cart/remove_product", data
|
|
220
|
+
return Cart.from_api(self._post("/cart/remove_product", data,
|
|
221
|
+
add_picnic_headers=True))
|
|
220
222
|
|
|
221
223
|
def clear_cart(self) -> Cart:
|
|
222
|
-
return Cart.from_api(self._post("/cart/clear"))
|
|
224
|
+
return Cart.from_api(self._post("/cart/clear", add_picnic_headers=True))
|
|
223
225
|
|
|
224
226
|
def get_delivery_slots(self) -> DeliverySlots:
|
|
225
227
|
return DeliverySlots.from_api(self._get("/cart/delivery_slots"))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-picnic-api2
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
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>
|
|
@@ -8,7 +8,7 @@ Maintainer-email: CodeSalat <pypi@codesalat.dev>
|
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
License-File: LICENSE.md
|
|
10
10
|
Requires-Python: >=3.13
|
|
11
|
-
Requires-Dist: pydantic>=2.
|
|
11
|
+
Requires-Dist: pydantic>=2.13.4
|
|
12
12
|
Requires-Dist: requests>=2.34.2
|
|
13
13
|
Requires-Dist: typing-extensions>=4.16.0
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
python_picnic_api2/__init__.py,sha256=
|
|
2
|
-
python_picnic_api2/client.py,sha256=
|
|
1
|
+
python_picnic_api2/__init__.py,sha256=osxYdYiCQSEcxi-9WUKXcDVs54bAGctSaPQeukWy9V8,937
|
|
2
|
+
python_picnic_api2/client.py,sha256=x_OMRFe8x7SYinCdhyrxE_if3-kc7a5ndxWhRgL7sAg,10943
|
|
3
3
|
python_picnic_api2/exceptions.py,sha256=CZVj6qe6zF-ZAD7SphIwmG0fs-t9HE3aC-2TaAgInJ0,1058
|
|
4
4
|
python_picnic_api2/helper.py,sha256=CUoxRu2SZnHE-8azyfm7MUJ_vBA7ifVkHK-IUgUKuRM,971
|
|
5
5
|
python_picnic_api2/session.py,sha256=2nhlyJ2MXR1yHQRxw85B-KXF4zt8L5__KrI-T_VvURg,2388
|
|
@@ -13,7 +13,7 @@ python_picnic_api2/models/delivery.py,sha256=i29cw3E_To3azBGtYKvYkKolRpWJypWxPql
|
|
|
13
13
|
python_picnic_api2/models/pml.py,sha256=1NAygk1u2SKBo-QwWMoeuZ4ixTJdDLHdnM7blYdgplM,5290
|
|
14
14
|
python_picnic_api2/models/search.py,sha256=kGJVXKUml2wFfDyap000inhe5udGO_EssxVji0FJ1f4,2150
|
|
15
15
|
python_picnic_api2/models/user.py,sha256=Q0qmnhYacCCx93UO_OrpHLdiE4VtCWsunRhJUmxgruY,1662
|
|
16
|
-
python_picnic_api2-2.0.
|
|
17
|
-
python_picnic_api2-2.0.
|
|
18
|
-
python_picnic_api2-2.0.
|
|
19
|
-
python_picnic_api2-2.0.
|
|
16
|
+
python_picnic_api2-2.0.1.dist-info/METADATA,sha256=8c078uiryhxbsskzRu9v_ZlY4IvVOI2_JGqpEPkMkrE,8646
|
|
17
|
+
python_picnic_api2-2.0.1.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
18
|
+
python_picnic_api2-2.0.1.dist-info/licenses/LICENSE.md,sha256=CUvt2ilcBwKAfRAnoA4RNPTLcdUj3En21LPK9YkFMGg,11358
|
|
19
|
+
python_picnic_api2-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
{python_picnic_api2-2.0.0.dist-info → python_picnic_api2-2.0.1.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|