getFollowNewNovels method

Future<Novels> getFollowNewNovels({
  1. required Restrict? restrict,
  2. required CancelToken cancelToken,
})

获取关注者的新小说
restrict - 为ture获取公开的(public) 反之不公开(private) null(全部)

Implementation

Future<Novels> getFollowNewNovels({
  required Restrict? restrict,
  required CancelToken cancelToken,
}) async {
  final response = await _httpClient.get<String>(
    '/v1/novel/follow',
    queryParameters: {
      'filter': 'for_android',
      'restrict': null == restrict ? 'all' : restrict.toPixivStringParameter(),
    },
    cancelToken: cancelToken,
  );
  final data = Novels.fromJson(jsonDecode(response.data!));
  return data;
}