@chewhx/google-books
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

@chewhx/google-books - v4

[!NOTE] From experience, the results for each api call might differ slightly, even with the same parameters.

Installation

  npm install @chewhx/google-books

Imports

Note: All methods a promise.

import { search, title, id, author, isbn } from '@chewhx/google-books';

Types

import { Query, Params } from '@chewhx/google-books';
  • Takes in query and params argument
  • The first argument query is required.
  • query.q is a required field
// search(query, params)
search({ q: 'Atomic Habits' });

search - special keywords

search({ q: 'Atomic Habits', inauthor: 'James Clear' });
  • intitle: Returns results where the text following this keyword is found in the title.
  • inauthor: Returns results where the text following this keyword is found in the author.
  • inpublisher: Returns results where the text following this keyword is found in the publisher.
  • subject: Returns results where the text following this keyword is listed in the category list of the volume.
  • isbn: Returns results where the text following this keyword is the ISBN number.
  • lccn: Returns results where the text following this keyword is the Library of Congress Control Number. oclc: Returns results where the text following this keyword is the Online Computer Library Center number.

search - q can be empty string.

search({ q: '', intitle: 'Atomic Habits', inauthor: 'James Clear' });

search - specific parameters

Read more about API-specific query parameters

search({ q: 'Atomic Habits' }, { maxResults: 2 });
search({ q: 'Atomic Habits' }, { download: 'epub' });

id

Search for book with google books volume id

id('lFhbDwAAQBAJ');

title

Search for book with only title

title('atomic habits');

author

Search for book with only author

author('James Clear');

isbn

Search for book with only isbn

isbn('978-0735211292');

Readme

Keywords

Package Sidebar

Install

npm i @chewhx/google-books

Weekly Downloads

20

Version

4.0.1

License

MIT

Unpacked Size

39.8 kB

Total Files

30

Last publish

Collaborators

  • chewhx