iterateArticles method

Stream<Article> iterateArticles({
  1. DateTime? updatedSince,
  2. String? groupId,
  3. String? variantGroupId,
  4. bool? active,
  5. bool? stockTracked,
  6. int? limit,
  7. String? cursor,
})

Alle Artikel der Abfrage, Seite fuer Seite ueber nextCursor. cursor ist der Startpunkt; nennt der Server denselben Cursor zweimal, endet der Strom mit einem Antwortfehler statt einer Endlosschleife.

Implementation

Stream<Article> iterateArticles({
  DateTime? updatedSince,
  String? groupId,
  String? variantGroupId,
  bool? active,
  bool? stockTracked,
  int? limit,
  String? cursor,
}) =>
    _seitenweise(Aufrufe.listArticles, cursor, (c) async {
      final s = await listArticles(
        updatedSince: updatedSince,
        groupId: groupId,
        variantGroupId: variantGroupId,
        active: active,
        stockTracked: stockTracked,
        limit: limit,
        cursor: c,
      );
      return (eintraege: s.articles, nextCursor: s.nextCursor);
    });