fix: continuing error managment and documentation
This commit is contained in:
parent
59e1c2558c
commit
dad000a1b9
24 changed files with 389 additions and 182 deletions
|
|
@ -2,16 +2,19 @@ import 'package:seshat/data/services/api_client.dart';
|
|||
import 'package:seshat/domain/models/book.dart';
|
||||
import 'package:seshat/utils/result.dart';
|
||||
|
||||
/// Repository to manage [Book]
|
||||
class BookRepository {
|
||||
BookRepository({required ApiClient apiClient}) : _apiClient = apiClient;
|
||||
|
||||
final ApiClient _apiClient;
|
||||
|
||||
/// Gets a [Book] by its [ean]
|
||||
Future<Result<Book>> getBookByEAN(String ean) async {
|
||||
return await _apiClient.getBookByEAN(ean);
|
||||
}
|
||||
|
||||
Future<Result<Book>> getBookById(int id) async {
|
||||
return await _apiClient.getBookById(id);
|
||||
/// Gets a [Book] by its [bookId]
|
||||
Future<Result<Book>> getBookById(int bookId) async {
|
||||
return await _apiClient.getBookById(bookId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue