add manga recommendation

This commit is contained in:
wgh19
2024-05-15 09:13:07 +08:00
parent c60caad531
commit 8f0e44216a
2 changed files with 21 additions and 5 deletions

View File

@@ -400,4 +400,15 @@ class Network {
return Res.error(res.errorMessage);
}
}
Future<Res<List<Illust>>> getRecommendedMangas() async {
var res = await apiGet("/v1/manga/recommended?filter=for_android&include_ranking_illusts=true&include_privacy_policy=true");
if (res.success) {
return Res(
(res.data["illusts"] as List).map((e) => Illust.fromJson(e)).toList(),
subData: res.data["next_url"]);
} else {
return Res.error(res.errorMessage);
}
}
}