4.0.1 • Published 6 months ago

@chewhx/google-books v4.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@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';

search

  • 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');
4.0.1

6 months ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago