getSlots method

  1. @override
Future<List<Slot>> getSlots(
  1. String token
)
override

Fetches the slots the current user can theoretically reserve.

Implementation

@override
Future<List<Slot>> getSlots(String token) async {
  log('Fetching slots');

  final response = await api.callFunction(
    function: 'local_lbplanner_slots_get_my_slots',
    token: token,
  );

  response.assertJson();

  return response.asList.map(Slot.fromJson).toList();
}