Ubisam-MobileGit/tasks/004-gitea-api-client.md

1017 B

TASK-004: Implement the read-only Gitea API client

Status: planned — depends on TASK-003 and authentication contract Owner: Codex Reviewer: Claude

Outcome

Connect the repository browsing domain to authenticated, paginated Gitea API calls while keeping DTOs and tokens out of domain and UI layers.

Acceptance criteria

  • Base URL is configurable with the approved production default.
  • DTOs are separate from domain models and mapping is tested.
  • Repository, branch, tree, file, and commit endpoints support pagination where provided.
  • Authentication is injected without logging or exposing tokens.
  • HTTP, authorization, rate-limit, parsing, cancellation, and offline failures map to typed domain failures.
  • Branch, ref, owner, repository, and path values are safely encoded as individual URL components.
  • Tests use a local fake server and never contact production.

Required checks

./gradlew assembleDebug
./gradlew testDebugUnitTest
./gradlew lintDebug