getUserNovels method
获取用户的小说
userId
- 用户ID
Implementation
Future<Novels> getUserNovels(
int userId, {
required CancelToken cancelToken,
}) async {
final response = await _httpClient.get<String>(
'/v1/user/novels',
queryParameters: {
'user_id': userId,
},
cancelToken: cancelToken,
);
final data = Novels.fromJson(jsonDecode(response.data!));
return data;
}