annas_archive_api 0.0.3 copy "annas_archive_api: ^0.0.3" to clipboard
annas_archive_api: ^0.0.3 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 {
  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,
  );

  // Finds books from Anna's Archive.
  final List<Book> books = await AnnaApi().find(searchRequest);

  for (final Book book in books) {
    print(book.title);
  }

  const collectionRequest = CollectionRequest(
    type: Collection.goodReads,
    url:
        'https://www.goodreads.com/review/list/145381477-alvyn-fasuyi?ref=nav_mybooks',
  );

  // Fetches a collection of books from GoodReads.
  final List<Book> collection =
      await AnnaApi().fetchCollection(collectionRequest);

  for (final Book book in collection) {
    print(book.title);
  }
}
1
likes
0
points
308
downloads

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

unknown (license)

Dependencies

beautiful_soup_dart, flutter, freezed_annotation, http, json_annotation

More

Packages that depend on annas_archive_api