Skip to content

listBundles: server-side filters (only_prey, is_viewed, only_new, only_unsaved)#8

Merged
ooswald merged 1 commit into
mainfrom
add-bundles-filters
May 14, 2026
Merged

listBundles: server-side filters (only_prey, is_viewed, only_new, only_unsaved)#8
ooswald merged 1 commit into
mainfrom
add-bundles-filters

Conversation

@ooswald
Copy link
Copy Markdown
Owner

@ooswald ooswald commented May 14, 2026

What

GET /api/v1/bundles accepts the same filter parameters the official mobile app's filter sheet uses:

Param Effect
only_prey={true,false} restrict to prey / non-prey events
is_viewed={true,false} restrict to viewed / unviewed bundles
only_new={true,false} only never-seen bundles
only_unsaved={true,false} only bundles not yet in a collection
sort_order={asc,desc} alternate spelling of order_direction

These literals live in api_service.dart::getBundlesPage in the AOT snapshot and were missed by the original static-analysis sweep (which scanned URL literals but not the &xyz= query fragments inside the same function body).

Surface changes

  • ListBundlesOptions gains onlyPrey, isViewed, onlyNew, onlyUnsaved.
  • RequestOptions.query now accepts boolean alongside string | number.
  • CLI: flappie bundles list --prey true --viewed false --new --unsaved.
  • CLOUD_API.md + openapi.yaml updated.
  • Version bumped to 0.6.0.

Verified live

flappie bundles list --prey true   # total: 2, all is_prey: true
flappie bundles list --viewed false # total: 22, none is_viewed: true

Before: callers wanting prey-only had to paginate every page and filter client-side. After: one roundtrip.

🤖 Generated with Claude Code

… only_unsaved)

The Flappie cloud /api/v1/bundles endpoint accepts the same filter
parameters used by the official mobile app's filter sheet:

  only_prey={true,false}     — restrict to prey / non-prey events
  is_viewed={true,false}     — restrict to viewed / unviewed bundles
  only_new={true,false}      — only never-seen bundles
  only_unsaved={true,false}  — only bundles not yet in a collection
  sort_order={asc,desc}      — alternate spelling of order_direction

These params live as raw string literals in the Flutter AOT snapshot
and weren't covered by the original static-analysis sweep. Verified
live: only_prey=true reduces a 40-event account to 2 matching records
in a single roundtrip.

ListBundlesOptions gains `onlyPrey`, `isViewed`, `onlyNew`,
`onlyUnsaved`. RequestOptions.query now accepts booleans.

CLI gains `--prey`, `--viewed`, `--new`, `--unsaved` flags on
`flappie bundles list`.

CLOUD_API.md and openapi.yaml updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ooswald ooswald merged commit ca2aa92 into main May 14, 2026
1 check passed
@ooswald ooswald deleted the add-bundles-filters branch May 14, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant