Skip to content

Public API Routes — Legislation (Search + Detail + Recent) #35

@calebyhan

Description

@calebyhan

Motivation

The legislation search is the most complex public query — it supports full-text search across multiple fields plus multi-filter. This is a signature feature of the site.

Deliverables

  • Implement GET /api/legislation — paginated, filterable by search (matches title, bill_number, summary, full_text), status, type, session, sponsor; defaults to current session
  • Implement GET /api/legislation/:id — single legislation with nested actions list, ordered by display_order
  • Implement GET /api/legislation/recent — returns most recent legislation; filterable by limit (default 10) and type (e.g., "Nomination" for the Recent Nominations page)
  • Create router file: app/routers/legislation.py
  • Register router in app/main.py
  • Write integration tests covering: search by keyword, filter by status, filter by type, pagination, detail with actions

Important Notes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions