@rpidanny/nietzsche.js
v1.1.1
Published
Typescript package to download quotes from Goodreads.
Maintainers
Readme
nietzsche.js
A JavaScript package to download quotes from Goodreads.
Install
$ npm install --save @rpidanny/nietzsche.jsUsage
Basic example
import { getAllQuotesByTag } from '@rpidanny/nietzsche.js'
const quoteResponse = await getAllQuotesByTag('psychology')
console.log(quoteResponse)API Documentation
getQuotesByTag(options?)
Type: object
| key | default | type | description |
| ------ | ------- | -------- | ------------------------------------------------------------- |
| tag | None | string | The name of the tag to search. e.g. psychology, economics |
| page | 1 | number | The page number to get the quotes from. |
Response Type: GetQuotesResponse
getAllQuotesByTag(options?)
Type: object
| key | default | type | description |
| ------------- | ------- | -------- | ------------------------------------------------------------- |
| tag | None | string | The name of the tag to search. e.g. psychology, economics |
| concurrency | 10 | number | The number of parallel requests to goodreads |
| maxPages | 100 | number | The maximum number of pages to get quotes from |
Response Type: Array<Quotes>
getQuotesByPath(options?)
Type: object
| key | default | type | description |
| ------ | ------- | -------- | ----------------------------------------------------------------------------------- |
| path | None | string | The relative url path to extract quotes from. e.g. quotes, quotes/tag/economics |
| page | 1 | number | The page number to get the quotes from. |
Response Type: GetQuotesResponse
getAllQuotesByPath(options?)
Type: object
| key | default | type | description |
| ------------- | ------- | -------- | ----------------------------------------------------------------------------------- |
| path | None | string | The relative url path to extract quotes from. e.g. quotes, quotes/tag/economics |
| concurrency | 10 | number | The number of parallel requests to goodreads |
| maxPages | 100 | number | The maximum number of pages to get quotes from |
Response Type: Array<Quotes>
Types
Quote
{
text: string
author: string
likes: number
tags: Array<string>
}GetQuotesResponse
{
quotes: Array<Quote>
pageNumber: number
totalPages: number
count: number
}