feat: added search
This commit is contained in:
parent
b54b825dad
commit
166ee5b389
7 changed files with 193 additions and 60 deletions
|
|
@ -3,6 +3,7 @@ import 'package:seshat/domain/models/bal.dart';
|
|||
import 'package:seshat/domain/models/book.dart';
|
||||
import 'package:seshat/domain/models/book_instance.dart';
|
||||
import 'package:seshat/domain/models/owner.dart';
|
||||
import 'package:seshat/domain/models/search_result.dart';
|
||||
import 'package:seshat/utils/result.dart';
|
||||
|
||||
class BookInstanceRepository {
|
||||
|
|
@ -15,6 +16,14 @@ class BookInstanceRepository {
|
|||
return await _apiClient.getBookInstanceByEAN(balId, ean);
|
||||
}
|
||||
|
||||
Future<Result<List<SearchResult>>> getBySearch(
|
||||
int balId,
|
||||
String title,
|
||||
String author,
|
||||
) async {
|
||||
return await _apiClient.getBookInstanceBySearch(balId, title, author);
|
||||
}
|
||||
|
||||
Future<Result<BookInstance>> sendBook(
|
||||
Book book,
|
||||
Owner owner,
|
||||
|
|
|
|||
Reference in a new issue