Skip to content

Commit db09e0d

Browse files
committed
Renames everything to something distinct
1 parent 9e67976 commit db09e0d

11 files changed

Lines changed: 61 additions & 61 deletions

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const BibleApi = require('./src/index');
1+
const Berea = require('./src/index');
22

3-
module.exports = BibleApi;
3+
module.exports = Berea;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "bibleapi",
2+
"name": "berea",
33
"version": "1.0.0",
44
"description": "A promise-wrapped library and ORM for using https://scripture.api.bible",
55
"main": "build/index.js",
@@ -15,7 +15,7 @@
1515
},
1616
"repository": {
1717
"type": "git",
18-
"url": "https://github.com/paceaux/BibleApi"
18+
"url": "https://github.com/paceaux/Berea"
1919
},
2020
"keywords": [
2121
"Scripture",
@@ -39,7 +39,7 @@
3939
],
4040
"license": "MIT",
4141
"bugs": {
42-
"url": "https://github.com/paceaux/BibleApi/issues"
42+
"url": "https://github.com/paceaux/Berea/issues"
4343
},
4444
"dependencies": {
4545
"axios": "^0.21.1",

readme.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# BibleApi
1+
# Berea
22
A Promised-wrapped Node library and ORM for [https://scripture.api.bible/](API.Bible).
33

44
This includes a `bibleService` which is a promised-wrapped library for the API with some convenience methods.
@@ -17,7 +17,7 @@ But it **also** includes an ORM that turns data into `Bible`, `Book`, `Chapter`
1717
5. After it's created you will need the credentials
1818

1919
# Usage
20-
This is thoroughly documented via JSDoc and a [Github Wiki](https://github.com/paceaux/BibleApi/wiki)
20+
This is thoroughly documented via JSDoc and a [Github Wiki](https://github.com/paceaux/Berea/wiki)
2121

2222
Using the API and this library amounts to three steps:
2323

@@ -34,7 +34,7 @@ You may want multiple services if you plan on using different versions of the ap
3434

3535
### Basic Example
3636
```
37-
const {BibleService} = require('bibleapi');
37+
const {BibleService} = require('berea');
3838
3939
const service = new BibleService('someLongToken');
4040
```
@@ -43,7 +43,7 @@ const service = new BibleService('someLongToken');
4343
As the API itself is version controlled, the library is too. This is an optional second parameter:
4444

4545
```
46-
const {BibleService} = require('bibleapi');
46+
const {BibleService} = require('berea');
4747
4848
const service = new BibleService('someLongToken', 1);
4949
```
@@ -53,13 +53,13 @@ const service = new BibleService('someLongToken', 1);
5353
The Bible API itself offers text and audio. As you may want one over the other, this is an optional third parameter. The options are `text` or `audio`.
5454

5555
```
56-
const {BibleService} = require('bibleapi');
56+
const {BibleService} = require('berea');
5757
5858
const service = new BibleService('someLongToken', 1, 'audio');
5959
```
6060

6161
## Setting options in requests
62-
All of the [request options are documented](https://github.com/paceaux/BibleApi/wiki/Request-Parameters). One notable difference between how this library works is that _options can be camelCased_.
62+
All of the [request options are documented](https://github.com/paceaux/Berea/wiki/Request-Parameters). One notable difference between how this library works is that _options can be camelCased_.
6363

6464
While the [API](https://scripture.api.bible/livedocs#/) will require `content-type` if you want to set options, you can send `contentType`.
6565

@@ -69,7 +69,7 @@ Look in `src/constants/requestParameters.js` for all of the aliases. `RequestPar
6969
Before getting verses, chapters, or passages, you need a `bibleId`. The only way to know _that_ is to look at all of the Bibles, first.
7070

7171
### Get all Bibles
72-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#BiblesRequestParam) ( an array)
72+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#BiblesRequestParam) ( an array)
7373

7474
```
7575
async function doThings() {
@@ -79,7 +79,7 @@ async function doThings() {
7979
```
8080

8181
### Get Bibles with options
82-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#BibleResponse) (an array)
82+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#BibleResponse) (an array)
8383

8484
```
8585
async function doThings() {
@@ -91,7 +91,7 @@ async function doThings() {
9191
```
9292

9393
### Get One Bible
94-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#BibleResponse)
94+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#BibleResponse)
9595
* Request: only a string
9696

9797
Once you've found a `bibleId`, you can get some information on it.
@@ -113,8 +113,8 @@ e.g.
113113

114114

115115
### Get all books from a Bible (no options)
116-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#booksrequestparam)
117-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#bookresponse) (an array)
116+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#booksrequestparam)
117+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#bookresponse) (an array)
118118
* A Single parameter can be passed, an object, containing `id` for `bibleId` with additional options.
119119
Here, all that's passed is the `bibleId` as a string.
120120
```
@@ -125,8 +125,8 @@ async function doThings() {
125125
```
126126

127127
### Get all books from a Bible (with options)
128-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#booksrequestparam)
129-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#bookresponse) (an array)
128+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#booksrequestparam)
129+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#bookresponse) (an array)
130130
* A Single parameter can be passed, an object, containing `id` for `bibleId` with additional options.
131131
`includeChapters` is an option that's passed in.
132132

@@ -154,8 +154,8 @@ e.g.
154154

155155

156156
### Get all chapters from a book
157-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#chaptersrequestparam)
158-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#ChapterSummaryResponse) (an array)
157+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#chaptersrequestparam)
158+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#ChapterSummaryResponse) (an array)
159159
* A Single parameter can be passed, an object, containing `id` for `bibleId` and `bookId` with additional options.
160160

161161

@@ -167,8 +167,8 @@ async function doThings() {
167167

168168

169169
### Get one chapter
170-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#chaptersrequestparam)
171-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#ChapterResponse)
170+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#chaptersrequestparam)
171+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#ChapterResponse)
172172
* A Single parameter can be passed, an object, containing `id` for `bibleId` and `chapterId` with additional options.
173173

174174

@@ -190,7 +190,7 @@ e.g.
190190
* Mark 8:8 => <samp>MAR.8.8</samp>
191191

192192
### Get all verses from a chapter
193-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#versesummaryresponse) (as array)
193+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#versesummaryresponse) (as array)
194194

195195
Note that **this will not give you the content of the verses**. It may be useful, however, in getting `verseId`s
196196

@@ -201,8 +201,8 @@ async function doThings(){
201201
```
202202

203203
### Get one verse
204-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#VerseRequestParam)
205-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#verseresponse)
204+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#VerseRequestParam)
205+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#verseresponse)
206206
* A Single parameter can be passed, an object, containing `id` for `bibleId` and `verseId` with additional options.
207207

208208

@@ -214,8 +214,8 @@ async function doThings(){
214214
```
215215

216216
### Get Range of verses
217-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#PassageRequestParam)
218-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#passageresponse)
217+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#PassageRequestParam)
218+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#passageresponse)
219219

220220
Note: This is an alias for `getPassage()`
221221

@@ -239,8 +239,8 @@ e.g.
239239

240240

241241
### Get one passage
242-
* [Request Options](https://github.com/paceaux/BibleApi/wiki/Request-Parameters#PassageRequestParam)
243-
* [Response](https://github.com/paceaux/BibleApi/wiki/Response-Types#passageresponse)
242+
* [Request Options](https://github.com/paceaux/Berea/wiki/Request-Parameters#PassageRequestParam)
243+
* [Response](https://github.com/paceaux/Berea/wiki/Response-Types#passageresponse)
244244
* A Single parameter can be passed, an object, containing `id` for `bibleId` and `passageId` with additional options.
245245

246246

test/service/constructor.test.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('prototype', () => {
44
it('has BibleTypes', () => {
5-
expect(BibleApi).toHaveProperty('BibleTypes');
5+
expect(Berea).toHaveProperty('BibleTypes');
66
});
77
it('has RequestParameters', () => {
8-
expect(BibleApi).toHaveProperty('RequestParameters');
8+
expect(Berea).toHaveProperty('RequestParameters');
99
});
1010
});
1111
describe('constructor', () => {
1212
it('applies an api key', () => {
13-
const api = new BibleApi('5ae573a324440896fabd2942943728a5');
13+
const api = new Berea('5ae573a324440896fabd2942943728a5');
1414
expect(api).toHaveProperty('apikey', '5ae573a324440896fabd2942943728a5');
1515
});
1616
describe('bibleType', () => {
1717
it('has a default of text', () => {
18-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
18+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
1919
expect(api).toHaveProperty('medium', 'text');
2020
});
2121

2222
it('can be set to audio', () => {
23-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1, 'audio');
23+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1, 'audio');
2424
expect(api).toHaveProperty('medium', 'audio');
2525
});
2626
});
2727
describe('bibleType', () => {
2828
it('when the type is text, the bibleType is bibles', () => {
29-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
29+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
3030
expect(api).toHaveProperty('medium', 'text');
3131
expect(api).toHaveProperty('bibleType', 'bibles');
3232
});
3333

3434
it('when the type is audio, the bibleType is audio-bibles', () => {
35-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1, 'audio');
35+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1, 'audio');
3636
expect(api).toHaveProperty('medium', 'audio');
3737
expect(api).toHaveProperty('bibleType', 'audio-bibles');
3838
});
3939
});
4040

4141
describe('has a version', () => {
4242
it('has a default version', () => {
43-
const api = new BibleApi('5ae573a324440896fabd2942943728a5');
43+
const api = new Berea('5ae573a324440896fabd2942943728a5');
4444
expect(api).toHaveProperty('version', 1);
4545
});
4646
it('has can set a version', () => {
47-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 2);
47+
const api = new Berea('5ae573a324440896fabd2942943728a5', 2);
4848
expect(api).toHaveProperty('version', 2);
4949
});
5050
});
5151
describe('has dependencies', () => {
5252
it('has default dependencies', () => {
53-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 2);
53+
const api = new Berea('5ae573a324440896fabd2942943728a5', 2);
5454
expect(api).toHaveProperty('dependencies');
5555
expect(api.dependencies).toBeInstanceOf(Object);
5656
});
5757
it('has axios in dependencies by default', () => {
58-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 2);
58+
const api = new Berea('5ae573a324440896fabd2942943728a5', 2);
5959
expect(api.dependencies).toHaveProperty('Axios');
6060
expect(api.dependencies.Axios).toBeInstanceOf(Object);
6161
});
6262
});
6363
describe('has an axios object', () => {
6464
it('it has an axios object', () => {
65-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
65+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
6666
expect(api).toHaveProperty('axios');
6767
expect(api.axios).toBeInstanceOf(Object);
6868
expect(api.axios.defaults.headers).toHaveProperty('api-key', '5ae573a324440896fabd2942943728a5');
@@ -73,7 +73,7 @@ describe('constructor', () => {
7373
describe('static methods', () => {
7474
describe('hyphenate parameters', () => {
7575
it('will hyphenate allowed parameters', () => {
76-
const result = BibleApi.hyphenateParameters(
76+
const result = Berea.hyphenateParameters(
7777
{
7878
includeTitles: true,
7979
contentType: 'html',
@@ -83,7 +83,7 @@ describe('static methods', () => {
8383
expect(result).toHaveProperty('content-type', 'html');
8484
});
8585
it('leaves alone pre-hyphenated params', () => {
86-
const result = BibleApi.hyphenateParameters(
86+
const result = Berea.hyphenateParameters(
8787
{
8888
'include-titles': true,
8989
'content-type': 'html',

test/service/getBibles.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('getBibles', () => {
4-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
4+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
55

66
it('it gets a hugeass list of bibles', async () => {
77
const result = await api.getBibles();
@@ -30,7 +30,7 @@ describe('getBibles', () => {
3030
});
3131
});
3232
describe('getBibleById', () => {
33-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
33+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
3434

3535
it('can get by an Id', async () => {
3636
const result = await api.getBible('06125adad2d5898a-01');
@@ -47,7 +47,7 @@ describe('getBibleById', () => {
4747
});
4848
});
4949
describe('getBibleAudio', () => {
50-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1, 'audio');
50+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1, 'audio');
5151

5252
it('it gets a list of audio bibles', async () => {
5353
const result = await api.getBibles();

test/service/getBooks.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('getBooks', () => {
4-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
4+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
55

66
it('can get books if the id is a string', async () => {
77
const result = await api.getBooks('06125adad2d5898a-01');
@@ -18,7 +18,7 @@ describe('getBooks', () => {
1818
});
1919

2020
describe('getBook', () => {
21-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
21+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
2222

2323
it('gets a book when sent a single object', async () => {
2424
const result = await api.getBook({ id: '06125adad2d5898a-01', bookId: 'EXO' });

test/service/getChapters.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('getChapters', () => {
4-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
4+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
55

66
describe('getChaptersFromBook', () => {
77
it('gets chapters when sent two strings', async () => {

test/service/getPassages.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('getPassage', () => {
4-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
4+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
55

66
describe('getPassage', () => {
77
it('gets passages when sent two strings', async () => {

test/service/getVerses.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const BibleApi = require('../../src/bibleService');
1+
const Berea = require('../../src/bibleService');
22

33
describe('getVerses', () => {
4-
const api = new BibleApi('5ae573a324440896fabd2942943728a5', 1);
4+
const api = new Berea('5ae573a324440896fabd2942943728a5', 1);
55

66
describe('getVersesFromChapter', () => {
77
it('gets chapters when sent two strings', async () => {

0 commit comments

Comments
 (0)