annas_archive_api 0.0.2+1 annas_archive_api: ^0.0.2+1 copied to clipboard
Anna's archive API is an easy to use SDK for interacting with the popular Anna's Archive Service. It provides a simple interface for fetching and parsing data from the service.
import 'package:annas_archive_api/annas_archive_api.dart';
import 'package:annas_archive_api/src/enums.dart';
Future<void> main() async {
const searchRequest = SearchRequest(
query: 'harry potter',
useAdvanced: true,
author: 'rowling',
categories: [Category.fiction],
formats: [Format.epub, Format.pdf],
limit: 5,
language: Language.french,
sort: SortOption.smallest,
);
final List<Book> books = await AnnaApi().find(searchRequest);
for (final Book book in books) {
print(book.title);
}
}