notifications method

Future<Iterable<NotificationBase>> notifications({
  1. DateTime? before,
})

Implementation

Future<Iterable<NotificationBase>> notifications({DateTime? before}) async {
  final Map<String, dynamic> queryParameters = {};
  if (before != null) queryParameters['before'] = before.toIso8601String();
  final response =
      await dio.get('/notifications', queryParameters: queryParameters);
  return response.data.map((e) => NotificationBase.fromJson(e));
}