annas_archive_api 1.1.0 copy "annas_archive_api: ^1.1.0" to clipboard
annas_archive_api: ^1.1.0 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.

example/main.dart

import 'package:annas_archive_api/annas_archive_api.dart';

Future<void> main() async {
  // Finds books from Anna's Archive.
  await AnnaApi()
      .find(
        const SearchRequest(
          query: 'harry potter',
          author: 'rowling',
          categories: [Category.fiction],
          sources: [AnnaSource.zLibrary, AnnaSource.internetArchive],
          formats: [Format.epub, Format.pdf],

          language: Language.french,
          sort: SortOption.smallest,
        ),
      )
      .then((response) async {
        for (final Book book in response.books) {
          print(book.title);
        }

        // Get download links for a book.
        await AnnaApi().getDownloadLinks(response.books.first.md5).then((
          downloadLinks,
        ) {
          for (final String link in downloadLinks) {
            print(link);
          }
        });
      });

  // Finds journals from Anna's Archive.
  await AnnaApi()
      .findJournal(
        const SearchJournalRequest(
          query: '',
          language: Language.french,
          sources: [AnnaSource.libgenLi],
          sort: SortOption.newest,
        ),
      )
      .then((response) {
        for (final Book book in response.books) {
          print(book.title);
        }
      });
}
5
likes
140
points
513
downloads

Documentation

API reference

Publisher

verified publishertribestick.com

Weekly Downloads

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.

Homepage

License

BSD-3-Clause (license)

Dependencies

beautiful_soup_dart, book_scraper, collection, compute, freezed_annotation, html, http, json_annotation

More

Packages that depend on annas_archive_api