Skip to content
This repository was archived by the owner on May 10, 2020. It is now read-only.

Commit 5195062

Browse files
committed
Update options to accept API_URL
1 parent ee698d0 commit 5195062

File tree

4 files changed

+34
-35
lines changed

4 files changed

+34
-35
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shabados",
3-
"version": "2.0.0-beta.1",
3+
"version": "2.0.0-beta.2",
44
"description": "JavaScript API wrapper for Khajana REST API",
55
"main": "index.js",
66
"scripts": {

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export const API_URL = `https://api.shabados.org/`;
2-
31
export const TYPES = [
42
'First letter each word from start (Gurmukhi)',
53
'First letter each word anywhere (Gurmukhi)',
@@ -34,8 +32,9 @@ export const buildApiUrl = options => {
3432
hukam = false, // Boolean: Pass true if you want hukamnama of today.
3533
akhar = false, // Boolean: Pass true to convert query string (gurulipi) into unicode text.
3634
lipi = false, // Boolean: Pass true to convert query string (unicode) into gurulipi text.
37-
random = false, // Boolean: Pass true to get random shabad.
38-
randomid = false // Boolean: Pass true to get random shabad id only.
35+
random = false, // Boolean: Pass true to get random shabad.
36+
randomid = false, // Boolean: Pass true to get random shabad id only.
37+
API_URL = 'https://api.banidb.org/', // String: API_URL to hit. (Prod: api.banidb.com, Dev: devapi.khajana.org).
3938
} = options;
4039

4140
let url = API_URL;

0 commit comments

Comments
 (0)