Skip to content

Commit 735db68

Browse files
Remove getAll method declaration (#48)
Co-authored-by: theEvilReaper <[email protected]>
1 parent 8211457 commit 735db68

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

lib/api/base_api.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ class BaseApi<T extends DataModel> implements ClientAPI<T> {
5050
return fromJson(result.data!);
5151
}
5252

53-
@override
54-
Future<List<T>> getAll([int page = 1, int items = 20]) async {
55-
final baseUri = Uri.parse(apiClient.baseUrl);
56-
final uri = baseUri.replace(path: '${baseUri.path}/$endpoint/all');
57-
final result = await apiClient.dio.getUri(uri);
58-
return _formatter.fromJson(result.data!);
59-
}
60-
6153
@override
6254
Future<T> update(T model) async {
6355
final baseUri = Uri.parse(apiClient.baseUrl);

lib/api/client_api.dart

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,6 @@ abstract class ClientAPI<T extends DataModel> {
4343
/// Throws an exception if the addition fails.
4444
Future<T> add(T model);
4545

46-
/// Retrieves a paginated list of all models.
47-
///
48-
/// This method supports pagination through optional parameters:
49-
/// - [page]: The page number to retrieve (1-based indexing)
50-
/// - [items]: The number of items per page
51-
///
52-
/// Returns a [Future] that completes with a list of model instances.
53-
///
54-
/// Example:
55-
/// ```dart
56-
/// // Get the first page with 20 items
57-
/// final firstPage = await api.getAll();
58-
///
59-
/// // Get the second page with 50 items per page
60-
/// final secondPage = await api.getAll(2, 50);
61-
/// ```
62-
Future<List<T>> getAll([int page = 1, int items = 20]);
63-
6446
/// Retrieves a paginated page of models with metadata.
6547
///
6648
/// Returns a [PaginatedResult] which includes items and pagination info.

0 commit comments

Comments
 (0)