Skip to content

Commit

Permalink
refactor and fix, bump to version 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hub committed Jul 25, 2022
1 parent 6434ca9 commit 4659ec5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-bible-reference",
"name": "Bible Reference",
"version": "1.1.3",
"version": "1.1.4",
"minAppVersion": "0.12.0",
"description": "Taking Bible Study note in Obsidian.md application easily. Automatically suggesting Bible Verses as references. ",
"author": "tim-hub",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-bible-reference",
"version": "1.1.3",
"version": "1.1.4",
"description": "Taking Bible Study note in Obsidian.md application easily. Automatically suggesting Bible Verses as references. ",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/provider/BibleAPIDotComProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class BibleAPIDotComProvider extends BibleProvider {
public buildRequestURL(
bookName: string,
chapter: number,
verses?: number[],
verses: number[],
versionName?: string,
): string {
let queryString = `${bookName}+${chapter}:`;
Expand Down
2 changes: 1 addition & 1 deletion src/provider/BibleAPIFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class BibleAPIFactory {
return new BollyLifeProvider(bibleVersion);
}
default: {
return null;
return new BibleAPIDotComProvider(bibleVersion);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/provider/BibleProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { IVerse } from '../interfaces/IVerse';
export abstract class BibleProvider {
protected _key: string; // the version selected
protected _apiUrl: string;
protected _queryUrl?: string;
protected _bibleReferenceHead?: string;
protected _queryUrl: string;
protected _bibleReferenceHead: string;

/**
* Get the Key Identity for the Bible version
Expand Down Expand Up @@ -39,7 +39,7 @@ export abstract class BibleProvider {
public async query(
bookName: string,
chapter: number,
verse?: number[],
verse: number[],
versionName?: string,
): Promise<IVerse[]> {
if ((!this._key) && versionName) {
Expand Down
2 changes: 1 addition & 1 deletion src/provider/BollyLifeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BollyLifeProvider extends BibleProvider {
): string {
const baseUrl = this._chapterApiUrl;
const book = Reference.bookIdFromName(bookName);
this._queryUrl = `${baseUrl}/${versionName.toUpperCase()}/${book}/${chapter}/`;
this._queryUrl = `${baseUrl}/${versionName?.toUpperCase()}/${book}/${chapter}/`;
return this._queryUrl;
}

Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"1.1.0": "0.12.0",
"1.1.1": "0.12.0",
"1.1.2": "0.12.0",
"1.1.3": "0.12.0"
"1.1.3": "0.12.0",
"1.1.4": "0.12.0"
}

0 comments on commit 4659ec5

Please sign in to comment.