getWorkByKey method

Future<WorkDTO?> getWorkByKey(
  1. String editionKey
)

Implementation

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