Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
collections_remote_datasource.dart
Go to the documentation of this file.
1import '../../../../../core/api/api_client.dart';
2import '../../../../../core/api/api_endpoints.dart';
3
6 CollectionsRemoteDataSource({required this.client});
7
8 Future<List<dynamic>> fetchCollectionTimes() async {
9 final response = await client.get(
11 );
12 return response;
13 }
14
15 Future<List<dynamic>> fetchOnGoingCollectionRequests({
16 required String param,
17 }) async {
18 final response = await client.get(
20 );
21 return response;
22 }
23
24 Future<List<dynamic>> fetchCompletedCollectionRequests({
25 required String param,
26 }) async {
27 final response = await client.get(
29 );
30 return response;
31 }
32
33 Future<Map<String, dynamic>> createCollectionRequest({
34 required Map<String, dynamic> body,
35 }) async {
36 final response = await client.post(
38 data: body,
39 );
40 return response;
41 }
42
43 Future<Map<String, dynamic>> updateCollectionRequest({
44 required Map<String, dynamic> body,
45 }) async {
46 final response = await client.post(
48 data: body,
49 );
50 return response;
51 }
52}
Future< dynamic > get(String path, [Map< String, dynamic >? headers, bool? isAuth, String? url,]) async
Future< Map< String, dynamic > > post({ required String path, required Map< String, dynamic > data, Map< String, dynamic >? headers, bool? isAuth, }) async
static const String createCollectionPath
static const String listProposedTimePath
static retrieveDoneCollections(String param)
static const String updateCollectionPath
static retrieveOnGoingCollections(String param)
Future< Map< String, dynamic > > updateCollectionRequest({ required Map< String, dynamic > body, }) async
CollectionsRemoteDataSource({required this.client})
Future< List< dynamic > > fetchOnGoingCollectionRequests({ required String param, }) async
Future< Map< String, dynamic > > createCollectionRequest({ required Map< String, dynamic > body, }) async
Future< List< dynamic > > fetchCollectionTimes() async
Future< List< dynamic > > fetchCompletedCollectionRequests({ required String param, }) async