etsy-python 1.1.10__tar.gz → 1.1.11__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.
- {etsy_python-1.1.10/etsy_python.egg-info → etsy_python-1.1.11}/PKG-INFO +1 -1
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/_version.py +1 -1
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/common/Utils.py +23 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Listing.py +15 -8
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingInventory.py +5 -2
- {etsy_python-1.1.10 → etsy_python-1.1.11/etsy_python.egg-info}/PKG-INFO +1 -1
- {etsy_python-1.1.10 → etsy_python-1.1.11}/LICENSE +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/MANIFEST.in +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/README.md +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/auth/OAuth.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/auth/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/common/Env.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/common/Request.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/common/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/HolidayPreferences.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/Language.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/Listing.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/ListingInventory.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/ProcessingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/ShippingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/ShopReceipt.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/enums/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/exceptions/BaseAPIException.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/exceptions/RequestException.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/exceptions/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/FileRequest.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/HolidayPreferences.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Listing.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Miscellaneous.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/ProcessingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Product.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Receipt.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Request.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/ShippingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Shop.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/ShopReturnPolicy.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/Utils.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/models/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/HolidayPreferences.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingFile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingImage.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingOffering.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingProduct.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingTranslation.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingVariationImages.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingVideo.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Miscellaneous.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Payment.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/PaymentLedgerEntry.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ProcessingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Receipt.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ReceiptTransactions.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Response.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Review.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Session.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ShippingProfile.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Shop.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ShopProductionPartner.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ShopReturnPolicy.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ShopSection.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/Taxonomy.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/User.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/UserAddress.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/enums/RateLimit.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/enums/Request.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/enums/__init__.py +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python.egg-info/SOURCES.txt +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python.egg-info/dependency_links.txt +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python.egg-info/requires.txt +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python.egg-info/top_level.txt +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/setup.cfg +0 -0
- {etsy_python-1.1.10 → etsy_python-1.1.11}/setup.py +0 -0
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from enum import Enum
|
|
2
3
|
from typing import Any, Dict, List, Optional
|
|
3
4
|
|
|
4
5
|
|
|
6
|
+
def warn_removed_legacy_param(operation_id: str) -> None:
|
|
7
|
+
"""Warn that `legacy` was removed from an operation and is no longer sent.
|
|
8
|
+
|
|
9
|
+
Etsy dropped the `legacy` query parameter from the listing endpoints without
|
|
10
|
+
a deprecation period. The keyword argument is kept so existing callers don't
|
|
11
|
+
break, but the value is not forwarded. Note `legacy` is still valid on other
|
|
12
|
+
operations (receipts, transactions, getListingsByListingIds), which keep it.
|
|
13
|
+
|
|
14
|
+
Called whenever ``legacy`` is passed explicitly — including ``legacy=False``.
|
|
15
|
+
That is deliberate: ``legacy=False`` previously sent ``?legacy=false`` on the
|
|
16
|
+
wire, so silently dropping it is a request-shape change the caller should
|
|
17
|
+
know about, not just a no-op.
|
|
18
|
+
"""
|
|
19
|
+
warnings.warn(
|
|
20
|
+
f"'legacy' was removed from {operation_id} by Etsy and is no longer "
|
|
21
|
+
"sent (any explicit value, including False, is discarded); it will be "
|
|
22
|
+
"dropped from this method in a future major version.",
|
|
23
|
+
DeprecationWarning,
|
|
24
|
+
stacklevel=3,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
5
28
|
def generate_get_uri(uri: str, params: Optional[Dict[str, Any]] = None) -> str:
|
|
6
29
|
if not params:
|
|
7
30
|
return uri
|
|
@@ -2,6 +2,7 @@ import warnings
|
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from typing import Optional, List, Dict, Any, Union
|
|
4
4
|
|
|
5
|
+
from etsy_python.v3.common.Utils import warn_removed_legacy_param
|
|
5
6
|
from etsy_python.v3.enums.Listing import Includes, State, SortOn, SortOrder
|
|
6
7
|
from etsy_python.v3.exceptions.RequestException import RequestException
|
|
7
8
|
from etsy_python.v3.models.Listing import (
|
|
@@ -25,10 +26,11 @@ class ListingResource:
|
|
|
25
26
|
listing: CreateDraftListingRequest,
|
|
26
27
|
legacy: Optional[bool] = None,
|
|
27
28
|
) -> Union[Response, RequestException]:
|
|
29
|
+
if legacy is not None:
|
|
30
|
+
warn_removed_legacy_param("createDraftListing")
|
|
28
31
|
endpoint = f"/shops/{shop_id}/listings"
|
|
29
32
|
return self.session.make_request(
|
|
30
|
-
endpoint, method=Method.POST, payload=listing
|
|
31
|
-
query_params={"legacy": legacy},
|
|
33
|
+
endpoint, method=Method.POST, payload=listing
|
|
32
34
|
)
|
|
33
35
|
|
|
34
36
|
def get_listings_by_shop(
|
|
@@ -42,6 +44,8 @@ class ListingResource:
|
|
|
42
44
|
includes: Optional[List[Includes]] = None,
|
|
43
45
|
legacy: Optional[bool] = None,
|
|
44
46
|
) -> Union[Response, RequestException]:
|
|
47
|
+
if legacy is not None:
|
|
48
|
+
warn_removed_legacy_param("getListingsByShop")
|
|
45
49
|
endpoint = f"/shops/{shop_id}/listings"
|
|
46
50
|
query_params: Dict[str, Any] = {
|
|
47
51
|
"state": state.value,
|
|
@@ -52,7 +56,6 @@ class ListingResource:
|
|
|
52
56
|
"includes": ",".join(list(map(lambda inc: inc.value, includes)))
|
|
53
57
|
if includes is not None
|
|
54
58
|
else None,
|
|
55
|
-
"legacy": legacy,
|
|
56
59
|
}
|
|
57
60
|
return self.session.make_request(endpoint, query_params=query_params)
|
|
58
61
|
|
|
@@ -68,13 +71,14 @@ class ListingResource:
|
|
|
68
71
|
legacy: Optional[bool] = None,
|
|
69
72
|
allow_suggested_title: Optional[bool] = None,
|
|
70
73
|
) -> Union[Response, RequestException]:
|
|
74
|
+
if legacy is not None:
|
|
75
|
+
warn_removed_legacy_param("getListing")
|
|
71
76
|
endpoint = f"/listings/{listing_id}"
|
|
72
77
|
query_params: Dict[str, Any] = {
|
|
73
78
|
"includes": ",".join(list(map(lambda inc: inc.value, includes)))
|
|
74
79
|
if includes is not None
|
|
75
80
|
else None,
|
|
76
81
|
"language": language,
|
|
77
|
-
"legacy": legacy,
|
|
78
82
|
"allow_suggested_title": allow_suggested_title,
|
|
79
83
|
}
|
|
80
84
|
return self.session.make_request(endpoint, query_params=query_params)
|
|
@@ -95,6 +99,8 @@ class ListingResource:
|
|
|
95
99
|
buyer_country: Optional[str] = None,
|
|
96
100
|
currency: Optional[str] = None,
|
|
97
101
|
) -> Union[Response, RequestException]:
|
|
102
|
+
if legacy is not None:
|
|
103
|
+
warn_removed_legacy_param("findAllListingsActive")
|
|
98
104
|
endpoint = "/listings/active"
|
|
99
105
|
query_params: Dict[str, Any] = {
|
|
100
106
|
"limit": limit,
|
|
@@ -107,7 +113,6 @@ class ListingResource:
|
|
|
107
113
|
"taxonomy_id": taxonomy_id,
|
|
108
114
|
"shop_location": shop_location,
|
|
109
115
|
"is_safe": is_safe,
|
|
110
|
-
"legacy": legacy,
|
|
111
116
|
"buyer_country": buyer_country,
|
|
112
117
|
"currency": currency,
|
|
113
118
|
}
|
|
@@ -123,6 +128,8 @@ class ListingResource:
|
|
|
123
128
|
keywords: Optional[str] = None,
|
|
124
129
|
legacy: Optional[bool] = None,
|
|
125
130
|
) -> Union[Response, RequestException]:
|
|
131
|
+
if legacy is not None:
|
|
132
|
+
warn_removed_legacy_param("findAllActiveListingsByShop")
|
|
126
133
|
endpoint = f"/shops/{shop_id}/listings/active"
|
|
127
134
|
query_params: Dict[str, Any] = {
|
|
128
135
|
"limit": limit,
|
|
@@ -130,7 +137,6 @@ class ListingResource:
|
|
|
130
137
|
"sort_order": sort_order.value,
|
|
131
138
|
"offset": offset,
|
|
132
139
|
"keywords": keywords,
|
|
133
|
-
"legacy": legacy,
|
|
134
140
|
}
|
|
135
141
|
return self.session.make_request(endpoint, query_params=query_params)
|
|
136
142
|
|
|
@@ -228,10 +234,11 @@ class ListingResource:
|
|
|
228
234
|
self, shop_id: int, listing_id: int, listing: UpdateListingRequest,
|
|
229
235
|
legacy: Optional[bool] = None,
|
|
230
236
|
) -> Union[Response, RequestException]:
|
|
237
|
+
if legacy is not None:
|
|
238
|
+
warn_removed_legacy_param("updateListing")
|
|
231
239
|
endpoint = f"/shops/{shop_id}/listings/{listing_id}"
|
|
232
240
|
return self.session.make_request(
|
|
233
|
-
endpoint, method=Method.PATCH, payload=listing
|
|
234
|
-
query_params={"legacy": legacy},
|
|
241
|
+
endpoint, method=Method.PATCH, payload=listing
|
|
235
242
|
)
|
|
236
243
|
|
|
237
244
|
def get_listings_by_shop_receipt(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import Optional, Dict, Any, Union
|
|
3
3
|
|
|
4
|
+
from etsy_python.v3.common.Utils import warn_removed_legacy_param
|
|
4
5
|
from etsy_python.v3.exceptions.RequestException import RequestException
|
|
5
6
|
from etsy_python.v3.enums.Listing import InventoryIncludes
|
|
6
7
|
from etsy_python.v3.enums.ListingInventory import MaxVariationsSupported
|
|
@@ -21,11 +22,12 @@ class ListingInventoryResource:
|
|
|
21
22
|
includes: Optional[InventoryIncludes] = None,
|
|
22
23
|
legacy: Optional[bool] = None,
|
|
23
24
|
) -> Union[Response, RequestException]:
|
|
25
|
+
if legacy is not None:
|
|
26
|
+
warn_removed_legacy_param("getListingInventory")
|
|
24
27
|
endpoint = f"/listings/{listing_id}/inventory"
|
|
25
28
|
query_params: Dict[str, Any] = {
|
|
26
29
|
"show_deleted": show_deleted,
|
|
27
30
|
"includes": includes.value if includes is not None else None,
|
|
28
|
-
"legacy": legacy,
|
|
29
31
|
}
|
|
30
32
|
return self.session.make_request(endpoint, query_params=query_params)
|
|
31
33
|
|
|
@@ -34,9 +36,10 @@ class ListingInventoryResource:
|
|
|
34
36
|
legacy: Optional[bool] = None,
|
|
35
37
|
max_variations_supported: Optional[MaxVariationsSupported] = None,
|
|
36
38
|
) -> Union[Response, RequestException]:
|
|
39
|
+
if legacy is not None:
|
|
40
|
+
warn_removed_legacy_param("updateListingInventory")
|
|
37
41
|
endpoint = f"/listings/{listing_id}/inventory"
|
|
38
42
|
query_params: Dict[str, Any] = {
|
|
39
|
-
"legacy": legacy,
|
|
40
43
|
"max_variations_supported": max_variations_supported.value
|
|
41
44
|
if max_variations_supported is not None
|
|
42
45
|
else None,
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{etsy_python-1.1.10 → etsy_python-1.1.11}/etsy_python/v3/resources/ListingVariationImages.py
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|