esv_api 0.1.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 65

ESV API Client for Dart #

pub package travis-ci

A Dart client for the ESV API from Crossway. Can be used to download scripture from the ESV Bible. Documentation of the API and more details can be found at https://api.esv.org/.

An API key is required to use the API. You can get an API key by creating a new API application on the ESV API website.

Usage #

To use the example below, you will need to replace the text "Insert API Key Here".

Example:

import 'package:esv_api/esv_api.dart';

main() async {
  var esvApi = new ESVAPI('Insert API Key Here');

  var response = await esvApi.getPassageText('John 11:35',
      include_short_copyright: false, include_copyright: true);

  print(response.passages.first);
}

Example Output:

John 11:35

  [35] Jesus wept.

The Holy Bible, English Standard Version® (ESV®), copyright © 2001 by Crossway, a publishing ministry of Good News Publishers. Used by permission. All rights reserved.

Contributing #

This currently only implements passage text endpoint of the API. If you would like to implement other parts of the API, feel free to make a Github pull request.

This projected uses generated code for JSON serialization. If download Git repository, you will need to generate these files using pub run build_runner build.

0.1.2 #

  • Documentation and formatting

0.1.1 #

  • Reupload including generated files

0.1.0 #

  • Initial version

example/esv_api_example.dart

import 'package:esv_api/esv_api.dart';

main() async {
  var esvApi = ESVAPI('Insert API Key Here');

  var response = await esvApi.getPassageText('John 11:35',
      include_short_copyright: false, include_copyright: true);

  print(response.passages.first);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  esv_api: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:esv_api/esv_api.dart';
  
Version Uploaded Documentation Archive
0.1.2 Mar 11, 2019 Go to the documentation of esv_api 0.1.2 Download esv_api 0.1.2 archive
0.1.1 Mar 10, 2019 Go to the documentation of esv_api 0.1.1 Download esv_api 0.1.1 archive
0.1.0 Mar 10, 2019 Go to the documentation of esv_api 0.1.0 Download esv_api 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Jun 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:esv_api/esv_api.dart.

Health issues and suggestions

Document public APIs. (-1 points)

25 out of 25 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+1 0.12.0+2
json_annotation ^2.0.0 2.4.0
meta ^1.1.7 1.1.7
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
path 1.6.2
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^1.2.8
json_serializable ^2.0.2
pedantic ^1.0.0 1.7.0
test ^1.0.0