checkIfUserFollowsUser method

Future<bool> checkIfUserFollowsUser(
  1. String sessionToken,
  2. String userId
)
inherited

Endpoint used: GET /user/follows/user/{id}

Simply check if the user identified by the current session sessionToken follows a User with userId or uuid and return a bool

Implementation

Future<bool> checkIfUserFollowsUser(
    String sessionToken, String userId) async {
  var response = await checkIfUserFollowsUserResponse(sessionToken, userId);
  if (response.statusCode == 200) {
    return true;
  } else if (response.statusCode == 404) {
    return false;
  } else {
    throw MangadexServerException(jsonDecode(response.body));
  }
}