addFollow method

Future<void> addFollow(
  1. int userId, {
  2. Restrict restrict = Restrict.public,
})

关注用户
userId - 用户ID
restrict 为ture获取公开的(public) 反之不公开(private)

Implementation

Future<void> addFollow(
  int userId, {
  Restrict restrict = Restrict.public,
}) async {
  await _httpClient.post<String>(
    '/v1/user/follow/add',
    data: FormData.fromMap(
      {
        'user_id': userId,
        'restrict': restrict.toPixivStringParameter(),
      },
    ),
  );
}