mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
18 lines
485 B
Dart
18 lines
485 B
Dart
|
import 'package:comunic/helpers/groups_helper.dart';
|
||
|
import 'package:comunic/models/api_request.dart';
|
||
|
import 'package:comunic/models/group.dart';
|
||
|
|
||
|
/// Forez groups helper
|
||
|
///
|
||
|
/// @author Pierre Hubert
|
||
|
|
||
|
class ForezGroupsHelper {
|
||
|
static Future<List<Group>> getForezGroups() async {
|
||
|
return (await APIRequest.withLogin("forez/get_groups").execWithThrow())
|
||
|
.getArray()
|
||
|
.cast<Map<String, dynamic>>()
|
||
|
.map(GroupsHelper.getGroupFromAPI)
|
||
|
.toList();
|
||
|
}
|
||
|
}
|