搜索插件、代码仓与 APP 分类

插件详情v1.0.0

bible

一个简单的应用程序,可从单一位置与多个圣经API进行交互

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
101
喜欢数
21
Pub 分数
130

安装插件

flutter pub add bible

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Bible 包是一个 Flutter/Dart 库,通过单一接口提供对多个圣经 API 的统一访问。它简化了与各种圣经数据源的集成,使开发者能够高效地获取经文段落、搜索文本和检索元数据。该包专为跨平台使用而设计,支持 Android、iOS、Web、macOS、Windows 和 Linux。它抽象了 API 差异,提供了查询圣经内容的一致方法,非常适合用于基于信仰的应用程序、学习工具或灵修平台。通过 `flutter pub add bible` 进行最少设置,开发者可以快速将丰富的圣经内容集成到其应用程序中。

适合场景

  • 圣经阅读应用程序
  • 经文引用工具
  • 灵修和祈祷应用
  • 宗教教育平台
  • 跨平台圣经集成

主要特点

  • 统一API接口
  • 支持多种圣经来源
  • 跨平台兼容性
  • 通过 pub 简单安装
  • 一致的数据检索方法
  • 轻量且易于集成

适合对象

  • 开发宗教类应用程序的开发者
  • 教育软件创作者
  • 移动和网络应用团队
  • 开源项目贡献者
  • 需要圣经数据的应用程序

使用建议

  • 依赖外部圣经API
  • 可能需要处理速率限制
  • 数据格式一致性因来源而异
  • 仅限文本类经文检索
  • 无内置缓存机制
  • 需要互联网连接以获取数据

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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 notes
esvapi yes
getbible no Does not support verse references that cross chapters. Genesis 2-3 ✅ Gensis 2:1 - 3:5 ❌
bibleorg no
bibleapi 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 the API key as an optional parameter:

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

You can also pass query parameters through a map. See specific API documentation for those parameters.

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

You can specify the version or provider with optional parameters.

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

**Note:**The providerName coresponds to that in the table at the beginning of this documentation.

Every time a passage is queried, the reference_parser library tries to parse the query (i.e mispelling will automatically be corrected, shortened verse forms will be allowed). To prevent this just pass false to the useParser parameter.

var passage = await Bible.queryPassage('John 3:16', useParser: false);

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 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 extensive dart knowledge, just copy a provider already created and go from there!

APIs that need implementing:

Name Difficulty
nltapi easy
bibliaapi moderate
scriptureapi hard

For more specific information look at the contributing guidlines.

所属分类

依赖

依赖清单 2 项

  • http^0.13.3
  • reference_parser^3.0.0

源码仓库

使用此插件的项目

暂无相关数据。