tradera-cli 0.1.5__tar.gz → 0.1.6__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.
- {tradera_cli-0.1.5/tradera_cli.egg-info → tradera_cli-0.1.6}/PKG-INFO +1 -1
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/pyproject.toml +1 -1
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli/api.py +12 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6/tradera_cli.egg-info}/PKG-INFO +1 -1
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/LICENSE +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/README.md +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/setup.cfg +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_api.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_cli.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_cli_entry.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_formatters.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_import.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tests/test_main_module.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli/__init__.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli/__main__.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli/cli.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli/formatters.py +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli.egg-info/SOURCES.txt +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli.egg-info/dependency_links.txt +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli.egg-info/entry_points.txt +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli.egg-info/requires.txt +0 -0
- {tradera_cli-0.1.5 → tradera_cli-0.1.6}/tradera_cli.egg-info/top_level.txt +0 -0
|
@@ -95,14 +95,26 @@ class TraderaClient:
|
|
|
95
95
|
offers = item.get("offers")
|
|
96
96
|
offer_data = offers if isinstance(offers, dict) else (offers[0] if isinstance(offers, list) and offers else {})
|
|
97
97
|
|
|
98
|
+
availability = offer_data.get("availability", "")
|
|
99
|
+
status = "Unknown"
|
|
100
|
+
if "InStock" in availability:
|
|
101
|
+
status = "Ongoing"
|
|
102
|
+
elif "OutOfStock" in availability:
|
|
103
|
+
status = "Ended"
|
|
104
|
+
|
|
98
105
|
return {
|
|
99
106
|
"itemId": item.get("sku"),
|
|
100
107
|
"title": item.get("name"),
|
|
101
108
|
"shortDescription": item.get("name"),
|
|
102
109
|
"description": item.get("description"),
|
|
103
110
|
"price": offer_data.get("price"),
|
|
111
|
+
"buyNowPrice": offer_data.get("price"),
|
|
112
|
+
"fixedPrice": offer_data.get("price"),
|
|
113
|
+
"leadingBid": offer_data.get("price"),
|
|
114
|
+
"openingBid": offer_data.get("price"),
|
|
104
115
|
"currency": offer_data.get("priceCurrency", "SEK"),
|
|
105
116
|
"mainImage": item.get("image"),
|
|
117
|
+
"status": status,
|
|
106
118
|
}
|
|
107
119
|
except (ValueError, TypeError):
|
|
108
120
|
continue
|
|
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
|