2.0.2 • Published 2 years ago

@amanda-mitchell/esv-api v2.0.2

Weekly downloads
72
License
MIT
Repository
github
Last release
2 years ago

@amanda-mitchell/esv-api

Release

This is a Javascript client for Crossway's ESV API.

Installation

yarn add @amanda-mitchell/esv-api

Usage

import { createEsvApiClient } from '@amanda-mitchell/esv-api';

// This can be any method that is compatible with the Fetch interface.
import fetch from 'node-fetch';

const apiKey =
  'Go to https://api.esv.org/ to register an application and get an API key.';

const client = createEsvApiClient({ apiKey, fetch });

client
  .content({
    passage: 'Genesis 1:1',
    format: 'txt',
    bible: 'leb',
  })
  .then(console.log)
  .catch(console.error);

Available methods

Each of these methods takes two parameters: a query string, and an optional options hash containing the keys corresponding to the official API docs. To make consumption in JS easier, each option has been converted to camel case. For example, rather than include-passage-references, this client accepts an includePassageReferences key.

With the exception of passageAudio, each endpoint returns a Javascript object representing the parsed JSON of the response.

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago