summaryrefslogtreecommitdiff
path: root/player-android/test/api/dio_player_api_client_test.dart
AgeCommit message (Collapse)Author
2026-05-21Implement all remaining PlayerApiClient stubs and add unit testsPaul Buetow
Implements every previously-unimplemented method in DioPlayerApiClient: shares (listSharesForMedia, listMyShares, revokeShare), public shared-media endpoints (getSharedMediaPage, streamSharedMedia, getSharedThumbnail, downloadSharedMedia), config (getConfig), sets (getSetCover, updateSetCover, uploadToSet), media helpers (regenerateThumbnail, deleteMedia, restoreMedia), progress batch (batchUpdateProgress), podcasts (listPodcasts, listEpisodes, downloadEpisode, toggleEpisodeComplete), admin users/permissions/scanner (listUsers, createUser, deleteUser, listPermissions, grantPermission, revokePermission, triggerRescan, getScanProgress, listTrash), and API tokens (listAPITokens, createAPIToken, revokeAPIToken). Adds listAPITokens/createAPIToken/revokeAPIToken/batchUpdateProgress to the abstract PlayerApiClient. Corrects listPermissions return type from List<Map> to Map<String,dynamic> to match the server's single-object response. Adds 18 new unit tests covering shares (listMyShares success/empty/401, revokeShare success/404/401) and podcasts (listEpisodes success/pagination/ empty/401, toggleEpisodeComplete success/404/401). All 264 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20Implement DioPlayerApiClient with real HTTP bodies for core API methods (oa)Paul Buetow
Replace UnimplementedError stubs with concrete Dio calls for bootstrap, login, logout, listSets, browseSet, listMedia, getMedia, streamMedia, downloadMedia, getThumbnail, healthz, and readyz. Wire DioPlayerApiClient into the Riverpod provider. Add http_mock_adapter dev dependency and 25 unit tests covering success + error paths for all implemented methods. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>