Skip to content

Implement records API methods (list, search, get, versions) #9

@ran-codes

Description

@ran-codes

Description

Implement the API-layer methods for records endpoints.

Requirements

  • FR-2.1: GET /api/user/records — list user's records and drafts
  • FR-2.2: GET /records/ — search published records with Elasticsearch query
  • FR-2.3: GET /records/:id — get full record details
  • FR-2.4: GET /api/records/:id/versions — list all versions

Acceptance Criteria

  • internal/api/records.go with methods:
    • ListUserRecords(params) — paginated, supports --status and --community filters
    • SearchRecords(query, params) — paginated, supports --community filter
    • GetRecord(id) — single record fetch
    • ListVersions(id) — paginated version list
  • All methods return typed model structs
  • Pagination support (page/size params, link header parsing)
  • Unit tests with httptest mock server

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions