wbapi-async 0.6.2__tar.gz → 0.7.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbapi-async
3
- Version: 0.6.2
3
+ Version: 0.7.0
4
4
  Summary: Asynchronous client for Wildberries API
5
5
  Project-URL: Documentation, https://serdukow.github.io/wbapi-async/
6
6
  Project-URL: Repository, https://github.com/serdukow/wbapi-async
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "wbapi-async"
7
- version = "0.6.2"
7
+ version = "0.7.0"
8
8
  description = "Asynchronous client for Wildberries API"
9
9
  authors = [
10
10
  { name = "Andrei Serdiukov", email = "asyncdf@gmail.com" },
@@ -601,6 +601,22 @@ class MethodDispatcher:
601
601
 
602
602
  result: list[Any] = list(page)
603
603
 
604
+ # rrd_id cursor — detected by presence of rrd_id in last item
605
+ if page and isinstance(page[-1], dict) and "rrd_id" in page[-1]:
606
+ while page:
607
+ rrd_id = page[-1]["rrd_id"]
608
+ page = _extract_list(await _do_request({"rrdid": rrd_id})) or []
609
+ result.extend(page)
610
+ return result
611
+
612
+ # lastChangeDate cursor — detected by presence of lastChangeDate in last item
613
+ if page and isinstance(page[-1], dict) and "lastChangeDate" in page[-1]:
614
+ while page:
615
+ date_from = page[-1]["lastChangeDate"]
616
+ page = _extract_list(await _do_request({"dateFrom": date_from})) or []
617
+ result.extend(page)
618
+ return result
619
+
604
620
  # Cursor pagination
605
621
  if isinstance(raw, dict) and "next" in raw:
606
622
  cursor = raw["next"]
File without changes
File without changes
File without changes