f_google_books_api 1.0.1 copy "f_google_books_api: ^1.0.1" to clipboard
f_google_books_api: ^1.0.1 copied to clipboard

Package to search ebook using google API

example/main.dart

import 'package:f_google_books_api/f_google_books_api.dart';
import 'package:f_google_books_api/model/volume/request/volume_filter_model.dart';
import 'package:f_google_books_api/model/volume/request/volume_print_type_model.dart';
import 'package:f_google_books_api/model/volume/request/volume_request_model.dart';
import 'package:f_google_books_api/model/volume/request/volume_sorting_model.dart';
import 'package:flutter/foundation.dart';

void main(List<String> arguments) async {
  //initialize the package
  var apiKey = '';
  var fgoogleBookApi = FGoogleBooksApi(apiKey);

  //Create a requestModel
  var requestModel = VolumeRequestModel(
    query: 'Harry Potter',
    startIndex: 0, // optional
    maxResults: 10, // optional
    epub: true, // optional
    filter: VolumeFilterModel.full, // optional
    orderBy: VolumeSortingModel.newest, // optional
    printType: VolumePrintTypeModel.all, // optional
  );

  //Await the searchBooks response
  var response = await fgoogleBookApi.searchBooks(requestModel);
  if (response != null) {
    var itemCount = response.totalItems?.toString() ?? '0';
    debugPrint('Number of books about http: $itemCount.');
  }
}
1
likes
140
pub points
0%
popularity

Publisher

unverified uploader

Package to search ebook using google API

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, http

More

Packages that depend on f_google_books_api