getRecommendedIllusts method

Future<Illusts> getRecommendedIllusts(
  1. IllustType type, {
  2. required CancelToken cancelToken,
})

获取推荐插画
type - 类型(IllustType)

Implementation

Future<Illusts> getRecommendedIllusts(
  IllustType type, {
  required CancelToken cancelToken,
}) async {
  final response = await _httpClient.get<String>(
    '/v1/${type.toPixivStringParameter()}/recommended',
    queryParameters: {
      'filter': 'for_android',
    },
    cancelToken: cancelToken,
  );
  final data = Illusts.fromJson(jsonDecode(response.data!));
  return data;
}