@amanda-mitchell/esv-api
Advanced tools
Comparing version 1.3.1 to 2.0.0
@@ -52,47 +52,47 @@ declare type ReadablePassageReference = string; | ||
passageText: (query: string, options?: Partial<{ | ||
includePassageReferences: boolean; | ||
includeVerseNumbers: boolean; | ||
includeFirstVerseNumbers: boolean; | ||
includeFootnotes: boolean; | ||
includeFootnoteBody: boolean; | ||
includeHeadings: boolean; | ||
includeShortCopyright: boolean; | ||
includeCopyright: boolean; | ||
includePassageHorizontalLines: boolean; | ||
lineLength: number; | ||
horizontalLineLength: number; | ||
includeSelahs: boolean; | ||
indentUsing: "space" | "tab"; | ||
indentParagraphs: number; | ||
indentPoetry: boolean; | ||
indentPoetryLines: number; | ||
indentDeclares: number; | ||
indentPsalmDoxology: number; | ||
includePassageReferences: any; | ||
includeVerseNumbers: any; | ||
includeFirstVerseNumbers: any; | ||
includeFootnotes: any; | ||
includeFootnoteBody: any; | ||
includeHeadings: any; | ||
includeShortCopyright: any; | ||
includeCopyright: any; | ||
includePassageHorizontalLines: any; | ||
lineLength: any; | ||
horizontalLineLength: any; | ||
includeSelahs: any; | ||
indentUsing: any; | ||
indentParagraphs: any; | ||
indentPoetry: any; | ||
indentPoetryLines: any; | ||
indentDeclares: any; | ||
indentPsalmDoxology: any; | ||
}> | undefined) => Promise<PassageContentResult>; | ||
passageHtml: (query: string, options?: Partial<{ | ||
includePassageReferences: boolean; | ||
includeVerseNumbers: boolean; | ||
includeFirstVerseNumbers: boolean; | ||
includeFootnotes: boolean; | ||
includeFootnoteBody: boolean; | ||
includeHeadings: boolean; | ||
includeShortCopyright: boolean; | ||
includeCopyright: boolean; | ||
includeCssLink: boolean; | ||
inlineStyles: boolean; | ||
wrappingDiv: boolean; | ||
divClasses: string; | ||
paragraphTag: string; | ||
includeBookTitles: boolean; | ||
includeVerseAnchors: boolean; | ||
includeChapterNumbers: boolean; | ||
includeCrossrefs: boolean; | ||
includeSubheadings: boolean; | ||
includeSurroundingChapters: boolean; | ||
includeSurroundingChaptersBelow: boolean; | ||
linkUrl: string; | ||
crossrefUrl: string; | ||
prefaceUrl: string; | ||
includeAudioLink: boolean; | ||
attachAudioLinkTo: boolean; | ||
includePassageReferences: any; | ||
includeVerseNumbers: any; | ||
includeFirstVerseNumbers: any; | ||
includeFootnotes: any; | ||
includeFootnoteBody: any; | ||
includeHeadings: any; | ||
includeShortCopyright: any; | ||
includeCopyright: any; | ||
includeCssLink: any; | ||
inlineStyles: any; | ||
wrappingDiv: any; | ||
divClasses: any; | ||
paragraphTag: any; | ||
includeBookTitles: any; | ||
includeVerseAnchors: any; | ||
includeChapterNumbers: any; | ||
includeCrossrefs: any; | ||
includeSubheadings: any; | ||
includeSurroundingChapters: any; | ||
includeSurroundingChaptersBelow: any; | ||
linkUrl: any; | ||
crossrefUrl: any; | ||
prefaceUrl: any; | ||
includeAudioLink: any; | ||
attachAudioLinkTo: any; | ||
}> | undefined) => Promise<PassageContentResult>; | ||
@@ -102,3 +102,3 @@ passageAudio: (query: string, options?: Partial<unknown> | undefined) => Promise<TBlob>; | ||
page: number; | ||
pageSize: number; | ||
pageSize: any; | ||
}> | undefined) => Promise<SearchResult>; | ||
@@ -105,0 +105,0 @@ }; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createEsvApiClient = exports.copyrightNotifications = void 0; | ||
const baseUrl = 'https://api.esv.org/v3'; | ||
exports.copyrightNotifications = { | ||
export const copyrightNotifications = { | ||
allQuotations: 'Scripture quotations are from the ESV® Bible (The Holy Bible, English Standard Version®), copyright © 2001 by Crossway, a publishing ministry of Good News Publishers. Used by permission. All rights reserved. You may not copy or download more than 500 consecutive verses of the ESV Bible or more than one half of any book of the ESV Bible.', | ||
@@ -74,3 +71,3 @@ markedQuotations: 'Scripture quotations marked “ESV” are from the ESV® Bible (The Holy Bible, English Standard Version®), copyright © 2001 by Crossway, a publishing ministry of Good News Publishers. Used by permission. All rights reserved. You may not copy or download more than 500 consecutive verses of the ESV Bible or more than one half of any book of the ESV Bible.', | ||
}); | ||
function createEsvApiClient({ apiKey, fetch, }) { | ||
export function createEsvApiClient({ apiKey, fetch, }) { | ||
const fetchOptions = { | ||
@@ -96,3 +93,2 @@ method: 'GET', | ||
} | ||
exports.createEsvApiClient = createEsvApiClient; | ||
function createEnum(...allowedValues) { | ||
@@ -99,0 +95,0 @@ const map = Object.fromEntries(allowedValues.map(x => [x, true])); |
@@ -1,14 +0,2 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./client"), exports); | ||
export * from './client'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
module.exports = require('./dist'); | ||
export * from './dist/index.js'; |
{ | ||
"name": "@amanda-mitchell/esv-api", | ||
"version": "1.3.1", | ||
"version": "2.0.0", | ||
"description": "A client for interacting with Crossway's ESV API.", | ||
@@ -10,2 +10,3 @@ "main": "index.js", | ||
"private": false, | ||
"type": "module", | ||
"publishConfig": { | ||
@@ -24,7 +25,8 @@ "access": "public" | ||
"devDependencies": { | ||
"@amanda-mitchell/node-project-scripts": "^2.36.0", | ||
"@amanda-mitchell/node-project-scripts": "3.0.8", | ||
"@jest/globals": "^27.5.1", | ||
"@types/node-fetch": "^2.5.8", | ||
"dotenv": "^8.2.0", | ||
"dotenv": "^16.0.0", | ||
"node-fetch": "^2.6.1" | ||
} | ||
} |
@@ -16,6 +16,6 @@ # @amanda-mitchell/esv-api | ||
```js | ||
const esvApi = require('@amanda-mitchell/esv-api'); | ||
import { createEsvApiClient } from '@amanda-mitchell/esv-api'; | ||
// This can be any method that is compatible with the Fetch interface. | ||
const fetch = require('node-fetch'); | ||
import fetch from 'node-fetch'; | ||
@@ -25,3 +25,3 @@ const apiKey = | ||
const client = esvApi.createEsvApiClient({ apiKey, fetch }); | ||
const client = createEsvApiClient({ apiKey, fetch }); | ||
@@ -28,0 +28,0 @@ client |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Yes
32528
5
270