Skip to content

Commit 75a44b8

Browse files
Update to latest API backend (#224)
* add backend test * update schema * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 088d2b2 commit 75a44b8

5 files changed

Lines changed: 2292 additions & 2973 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: blackdoc
1111
files: \.py$
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.15.9
13+
rev: v0.15.20
1414
hooks:
1515
- id: ruff-check
1616
args: [--fix, --exit-non-zero-on-fix]

src/keepa/constants.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
SCODES = {
1313
"400": "REQUEST_REJECTED",
1414
"402": "PAYMENT_REQUIRED",
15+
"404": "NOT_FOUND",
1516
"405": "METHOD_NOT_ALLOWED",
1617
"429": "NOT_ENOUGH_TOKEN",
18+
"500": "INTERNAL_SERVER_ERROR",
1719
}
1820

1921
# domain codes
@@ -27,15 +29,13 @@
2729
"FR",
2830
"JP",
2931
"CA",
30-
"CN",
32+
"RESERVED2",
3133
"IT",
3234
"ES",
3335
"IN",
3436
"MX",
3537
"BR",
3638
]
37-
# developer note: appears like CN (China) has changed to RESERVED2
38-
3939
# csv indices. used when parsing csv and stats fields.
4040
# https://github.com/keepacom/api_backend
4141
# see api_backend/src/main/java/com/keepa/api/backend/structs/Product.java
@@ -55,7 +55,7 @@
5555
(11, "COUNT_NEW", False),
5656
(12, "COUNT_USED", False),
5757
(13, "COUNT_REFURBISHED", False),
58-
(14, "CollectableOffers", False),
58+
(14, "COUNT_COLLECTIBLE", False),
5959
(15, "EXTRA_INFO_UPDATES", False),
6060
(16, "RATING", True),
6161
(17, "COUNT_REVIEWS", False),
@@ -72,7 +72,11 @@
7272
(28, "EBAY_NEW_SHIPPING", True),
7373
(29, "EBAY_USED_SHIPPING", True),
7474
(30, "TRADE_IN", True),
75-
(31, "RENT", False),
75+
(31, "RENT", True),
76+
(32, "BUY_BOX_USED_SHIPPING", True),
77+
(33, "PRIME_EXCL", True),
78+
(34, "COUNT_NEW_FBA", False),
79+
(35, "COUNT_NEW_FBM", False),
7680
]
7781

78-
_SELLER_TIME_DATA_KEYS = ["trackedSince", "lastUpdate"]
82+
_SELLER_TIME_DATA_KEYS = ["trackedSince", "lastUpdate", "lastRatingUpdate"]

0 commit comments

Comments
 (0)