biblebrain_dart 2.0.0 copy "biblebrain_dart: ^2.0.0" to clipboard
biblebrain_dart: ^2.0.0 copied to clipboard

A dart wrapper for the Bible Brain (aka Digital Bible Platform v4) API.

example/biblebrain_dart_example.dart

import 'package:biblebrain_dart/biblebrain_dart.dart';

void main() async {
  final client = BibleBrainClient(apiKey: '<API-KEY>');

  // Alphabet endpoints
  final alphabets = await client.alphabet.getAlphabets();
  print('${alphabets?.data?.length ?? 0} alphabets found');

  final alphabet = await client.alphabet.getAlphabet('Latn');
  print('${alphabet?.data?.name} alphabet found');

  // Bible endpoints
  final bibles = await client.bible.getBibles();
  print('${bibles.length} bibles found');

  final bible = await client.bible.getBible('ENGKJV');
  print('${bible?.data?.name} bible found');

  final books = await client.bible.getBooks('ENGKJV');
  print('${books?.data?.length} books found');

  final copyright = await client.bible.getCopyright('ENGKJV');
  print('${copyright.length} copyrights found');

  final chapter = await client.bible.getChapter('ENGKJV', 'GEN', 1);
  print('${chapter?.data?.length ?? 0} verses found');

  final defaultBibles = await client.bible.getDefaultBibles();
  print('${defaultBibles?.length ?? 0} default bibles found');

  final mediaTypes = await client.bible.getMediaTypes();
  print('${mediaTypes?.length ?? 0} media types found');

  // Country endpoints
  final countries = await client.country.getCountries();
  print('${countries.length} countries found');

  final country = await client.country.getCountry('PH');
  print('${country?.data?.name} country found');

  // Language endpoints
  final languages = await client.language.getLanguages();
  print('${languages.length} languages found');

  final language = await client.language.getLanguage(6513);
  print('${language?.data?.name} language found');

  // Number endpoints
  final numbers = await client.number.getNumbers();
  print('${numbers?.data?.length ?? 0} numbers found');

  final number = await client.number.getNumber('thai');
  print('${number?.data?.id} number found');

  // Search endpoints
  final searches = await client.search.search('love', 'ENGKJV');
  print('${searches.length} searches found');

  // Timestamp endpoints
  final filesets = await client.timestamp.getFilesetsWithTimestamps();
  print('${filesets.length} filesets found');

  final timestamps =
      await client.timestamp.getTimestamps('ENGKJVO1DA', 'GEN', 1);
  print('${timestamps?.data?.length ?? 0} timestamps found');
}
2
likes
160
points
59
downloads

Publisher

verified publishermarkivan.dev

Weekly Downloads

A dart wrapper for the Bible Brain (aka Digital Bible Platform v4) API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, json_annotation

More

Packages that depend on biblebrain_dart