bible 0.6.0 copy "bible: ^0.6.0" to clipboard
bible: ^0.6.0 copied to clipboard

outdated

A simple application to interact with multiple bible APIs from a single place

bible #

This package provides a simple interface for interacting with different bible APIs.

Usage #

This package currently only supports querying these APIs:

Name Requires API key
esvapi yes
getbible no

Simple example:

import 'package:bible/bible.dart' as Bible;
...
var passage = await Bible.queryPassage('John 3:16'); // Will default to the GetBible API
print(passage.passage) // The text from the query

An example requiring an API key

Bible.addKeys({'esvapi': 'APITOKEN'});
var passage = await Bible.queryPassage('John 3:16', providerName:'esvapi');

You can also pass API keys on queries alongside parameters for the specific API

...
Bible.addKeys({'esvapi': 'APITOKEN'});
var passage = await Bible.queryPassage('John 3:16', key: 'APITOKEN', parameters: {'Map': 'of params'});

You can specify bother the version and provider with optional parameter.

var passage = await Bible.queryPassage('John 3:16', providerName: 'getbible', version: 'asv');

If you import the providers library you can use can directly query every the providers or pass them to the queryPassage function as an optional parameter

import 'package:bible/bible.dart' as Bible;
import 'package:bible/providers.dart';
//...
var prov = GetBible();
var passage = await Bible.queryPassage('John 3:16', provider: prov);

This is the same as doing using the providerName parameter but if you were to create your own provider you could pass it to the function.

Note: If you create your own provider please consider contributing it back to the repository :).

Contributing #

Implementing an API isn't hard, so I'm open to having people implementing and sending pull requests for different bible APIs. This is a great first issue and doesn't require extension dart knowledge, just copy a provider already created and go from there!

APIs that need implementing:

Name Difficulty
bibleapi easy
bibleorg easy
nltapi easy
bibliaapi moderate
scriptureapi hard

For more specific information look at the contributing guidlines.

22
likes
0
pub points
50%
popularity

Publisher

verified publisherpetit.dev

A simple application to interact with multiple bible APIs from a single place

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, reference_parser

More

Packages that depend on bible