getLoggedUserDetails method

Future<UserDetails> getLoggedUserDetails(
  1. String sessionToken
)
inherited

Endpoint used: GET /auth/check

Gets the account details of the user and returns the data in a UserDetails class instance

Implementation

Future<UserDetails> getLoggedUserDetails(String sessionToken) async {
  var response = await getLoggedUserDetailsResponse(sessionToken);
  try {
    return UserDetails.fromJson(jsonDecode(response.body));
  } catch (e) {
    throw MangadexServerException(jsonDecode(response.body));
  }
}