getFollowingUsers method

Future<Users> getFollowingUsers(
  1. int userId, {
  2. Restrict restrict = Restrict.public,
  3. required CancelToken cancelToken,
})

获取关注用户
userId - 用户ID

Implementation

Future<Users> getFollowingUsers(
  int userId, {
  Restrict restrict = Restrict.public,
  required CancelToken cancelToken,
}) async {
  final response = await _httpClient.get<String>(
    '/v1/user/following',
    queryParameters: {
      'filter': 'for_android',
      'user_id': userId,
      'restrict': restrict.toPixivStringParameter(),
    },
    cancelToken: cancelToken,
  );
  final data = Users.fromJson(jsonDecode(response.data!));
  return data;
}