googlebooks-rs
A Rust client library for the Google Books API.
Features
- Simple and ergonomic query builder
- Search by ISBN, title, author, publisher, and more
- Type-safe response models
Installation
Add this to your Cargo.toml:
[]
= "0.2.2"
Usage
use ;
async
Query Builder
The library provides a fluent API for building queries:
use ;
let query = author
.lang_restrict
.print_type
.projection
.max_results;
Available Query Methods
new(search)- Generic searchisbn(isbn)- Search by ISBNtitle(title)- Search by titleauthor(author)- Search by authorpublisher(publisher)- Search by publishersubject(subject)- Search by subjectlccn(lccn)- Search by Library of Congress Control Numberoclc(oclc)- Search by OCLC number
You can chain queries with and_* methods:
and_isbn(isbn)and_title(title)and_author(author)and_publisher(publisher)and_subject(subject)and_lccn(lccn)and_oclc(oclc)
Query Options
max_results(n)- Limit the number of resultsstart_index(n)- Pagination offsetlang_restrict(lang)- Filter by language (e.g., "en", "fr")projection(Projection)- Metadata detail level (Full or Lite)print_type(PrintType)- Filter by content type (All, Books, or Magazines)
License
This project is licensed under the AGPL V3 License.