getAuthorByKey method

Future<AuthorDTO?> getAuthorByKey(
  1. String authorKey
)

Implementation

Future<AuthorDTO?> getAuthorByKey(String authorKey) async {
  try {
    var dioResponse = await _client.get('$openLibraryBase$authorKey.json');
    var model = AuthorDTO.fromJson(dioResponse.data);
    return model;
  } catch (e) {
    print(e);
    return null;
  }
}