bible-search
A client Bible Search Api wrapper for NodeJs https://pt-br.bibles.org/pages/api
Last updated 4 years ago by williampsena .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bible-search 
SYNC missed versions from official npm registry.

bible-search NPM version Build Status Dependency Status

A client Bible Search Api wrapper for NodeJs https://pt-br.bibles.org/pages/api

Install

$ npm install --save bible-search

Usage

var BibleSearch = require('bible-search');
var bibleSearch = new BibleSearch('<<API KEY HERE>>');

//
//ES6 Style
//
import BibleSearch from 'blble-search';
var bibleSearch = new BibleSearch('<<API KEY HERE>>');

//
// Get books
//
bibleApi.book.getBooks().then((data) => {
  //JSON Structure see: https://pt-br.bibles.org/pages/api/documentation/books 
}).catch(function (err) {
  console.log('Ops! Sorry :|');
});

//
// Get passage
//
bibleApi.passage.getPassage({
  book: 'rev',
  chapter: 21,
  start: 4
}).then(function (data) {
  //JSON Structure see: https://pt-br.bibles.org/pages/api/documentation/passages
}).catch(function (err) {
  console.log('Ops! Sorry :|');
});

//
// Get book chapters
//
bibleApi.book.getChapters({
  book: 'rev'
}).then(function (data) {
  //JSON Structure see: https://pt-br.bibles.org/pages/api/documentation/chapters
}).catch(function (err) {
  console.log('Ops! Sorry :|');
});

//
// Get book verses
//
bibleApi.book.getVerses({
  book: 'rev',
  chapter: 21
}).then(function (data) {
  //JSON Structure see: https://pt-br.bibles.org/pages/api/documentation/verses
}).catch(function (err) {
  console.log('Ops! Sorry :|');
});

//
// Search in the bible
//
bibleApi.search.find({
  query: 'Pai nosso'
}).then(function (data) {
  //JSON Structure see: https://pt-br.bibles.org/pages/api/documentation/search
}).catch(function (err) {
  console.log('Ops! Sorry :|');
});

Test

Before you run tests, you must create a file named: config-auth.json, example:

{
  "bibleApiKey": ""
}
npm test
gulp test

Build

gulp

Lib output: ./dist/

Generate ESDoc

gulp doc

Documentation output: ./dist/docs

License

Apache-2.0 © William Sena

TODO

  • Correct grammar mistakes! :)
  • Improve the documentation (ESDocs)
  • Support browserify
  • Refactoring ;)

Thanks :)

https://github.com/yeoman/generator-node

Current Tags

  • 1.0.5                                ...           latest (4 years ago)

7 Versions

  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (2)
Dev Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |