/// 앨범 API 서비스 library; import '../models/album.dart'; import 'api_client.dart'; /// 앨범 목록 조회 Future> getAlbums() async { final response = await dio.get('/albums'); final List data = response.data; return data.map((json) => Album.fromJson(json)).toList(); } /// 최신 앨범 N개 조회 Future> getRecentAlbums(int count) async { final albums = await getAlbums(); return albums.take(count).toList(); }