fetchSecrets static method

Future<List<Secret>> fetchSecrets()

Implementation

static Future<List<Secret>> fetchSecrets() async {
  final response = await _dio
      .get(ApiRoutes.secrets, queryParameters: {"expand": "author"});
  final List<dynamic> json = response.data['items'];
  final items = json.map((e) => Secret.fromJsonWithExpand(e)).toList();
  return items;
}