getIllustRelated method

Future<Illusts> getIllustRelated(
  1. int illustId, {
  2. required CancelToken cancelToken,
})

获取插画的相关推荐
illustId - 插画ID

Implementation

Future<Illusts> getIllustRelated(
  int illustId, {
  required CancelToken cancelToken,
}) async {
  final response = await _httpClient.get<String>(
    '/v2/illust/related',
    queryParameters: {
      'filter': 'for_android',
      'illust_id': illustId,
    },
    cancelToken: cancelToken,
  );
  final data = Illusts.fromJson(jsonDecode(response.data!));
  return data;
}