book method

Future<SearchEnvelope<Book>> book(
  1. String query, {
  2. Order? sort,
  3. int? page,
  4. int? size,
  5. BookTarget? target,
})

Implementation

Future<SearchEnvelope<Book>> book(String query,
    {Order? sort, int? page, int? size, BookTarget? target}) async {
  return ApiFactory.handleApiError(() async {
    final response = await _dio.get("/v3/search/book", queryParameters: {
      ..._getParams(query, sort, page, size),
      "target": target == null ? null : describeEnum(target).toLowerCase()
    });
    return SearchEnvelope<Book>.fromJson(response.data);
  });
}