Skip to content

EgorBogomazov/yehor-bohomazov-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yehor-bohomazov-sdk

Install

$ npm install yehor-bohomazov-sdk

or

$ yarn add yehor-bohomazov-sdk

Usage:

Get all books

import { getBookChapters, getBookItem, getBooks } from "yehor-bohomazov-sdk";

const request = async () => {
  const books = await getBooks();
  const booksList = books.docs;
  return booksList;
}

Get one book

const request = async (id) => {
  const book = await getBookItem(id);
  const booksList = books.docs;
  return booksList[0];
}

Get book chapters

const request = async (id) => {
  const bookChapters = await getBookChapters(id);
  const bookChaptersList = books.docs;
  return bookChaptersList;
}

Pagination params

const chapters = await getBookChapters(id, { sort: 'chapterName:desc', page: 2, offset: 10, limit: 100 });

Tested with create-react-app application

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published