getAuthorById method

Future<AuthorInfo> getAuthorById(
  1. String authorId
)
inherited

Endpoint used: GET /author/{id}

Get details of an author identified by the author's authorId or UUID nad return the data in an AuthorInfo class instance.

Implementation

Future<AuthorInfo> getAuthorById(String authorId) async {
  var response = await getAuthorByIdResponse(authorId);
  try {
    return AuthorInfo.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}