checkIfUserFollowsGroup method

Future<bool> checkIfUserFollowsGroup(
  1. String sessionToken,
  2. String groupId
)
inherited

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

Simply check if the user identified by the current session sessionToken follows a Group with groupId or uuid and return a http response

Implementation

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