# TASK-004: Implement the read-only Gitea API client Status: planned — depends on TASK-003 and authentication contract Owner: Codex Reviewer: Claude ## Writable paths - `app/src/main/java/com/ubisam/ubgitea/core/network/` - `app/src/main/java/com/ubisam/ubgitea/data/` - `app/src/main/java/com/ubisam/ubgitea/domain/` - `app/src/test/java/com/ubisam/ubgitea/core/network/` - `app/src/test/java/com/ubisam/ubgitea/data/` - `app/src/test/java/com/ubisam/ubgitea/domain/` - `app/build.gradle.kts` - `gradle/libs.versions.toml` - `docs/decisions/003-http-client.md` - `tasks/004-gitea-api-client.md` ## 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 ```text ./gradlew assembleDebug ./gradlew testDebugUnitTest ./gradlew lintDebug ```