Git Product home page Git Product logo

api-public's Introduction

GurbaniNow API

This API has been deprecated. No support will be provided.

Gurbani and Shabad REST API.

Documentation

The API Documentation can be viewed on the Wiki.

Licence

GurbaniNow API Copyright © 2015-2022 GurbaniNow Dev Team. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, as per version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

api-public's People

Contributors

bogas04 avatar dependabot-preview[bot] avatar dependabot[bot] avatar harjot1singh avatar sarabveer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-public's Issues

Feature Request - Daily Prayers Section

Hi, Is it possible to introduce a daily prayers section consisting of the following baniyan?

  • Japji Sahib
  • Jaap Sahib
  • Tav Prasad Svaiye
  • Rehras
  • Kirtan Sohaila
  • Ardaas (if available)

Improve API routes

It's very crude right now. You can try a cleaner scheme, something like:

mode=1 becomes /search/:query?source_id=(0|1|2|3)&type=(0|1|2|3)...
mode=2 becomes /shabad/:shabad_id
mode=3 becomes /ang/:ang_id?source_id=(0|1|2|3)

Keeping format=json, writer -> writer_id=0, recnum -> count=10, raag -> raag_id=0 as defaults to clean up the route a bit. Also renaming them to match the response of API.

Also using camelCase or snake_case as one standard throughout API (route and response) would be nice.

hukumnama null for 2017/11/27 today

https://api.gurbaninow.com/v2/hukamnama/2017/11/26 for yesterday works, provides Hukumnama Sahib.
https://api.gurbaninow.com/v2/hukamnama/2017/11/27 gets redirected to https://api.gurbaninow.com/v2/hukamnama/today , normal, as expected.

https://api.gurbaninow.com/v2/hukamnama/today
provides:

{
	"date": {
		"gregorian": {
			"month": "November",
			"date": 27,
			"year": 2017,
			"day": "Monday"
		},
		"nanakshahi": {
			"english": {
				"month": "Maghar",
				"date": 14,
				"year": 549,
				"day": "Somvaar"
			},
			"punjabi": {
				"month": "ਮੱਘਰ",
				"date": "੧੪",
				"year": "੫੪੯",
				"day": "ਸੋਮਵਾਰ"
			}
		}
	},
	"hukamnamainfo": null,
	"hukamnama": [],
	"license": "CC-BY-NC-ND-4.0"
}

"hukamnamainfo": null, is for all future dates, but 2017/11/27 is today; & Hukumnama Sahib has been issued from Darbar Sahib, see http://hukamnamasahib.com/2017/11/hukamnama-siri-darbar-sahib-amritsar-date-27-november-2017-ang-512/

Why is api not providing the data? Could you please have a look?

Provide ability to return only required data

I think it will be good if we add the parameters such as include=gurmukhi,eng_translation,eng_transliteration and so on so that only required data is returned in the resuls.

It will also good for your server to reduce the data transfer otherwise it will be returning the unnecessary data for every request and will increase the bandwidth data.

By default only return the gurmukhi, english translation and english transliteration and then others can be included using the 'include' parameter.

What you think?

[Suggestion] Gurlipi to Punjabi Unicode Route

Add a new route that allows conversion between the two gurmukhi representations. This too can be helpful for several applications/bots.

/akhar Representation Conversion

URL - akhar/:text/:target?
Examples - akhar/vwihgurU

{
  "error": false,
  "result": "ਵਾਹਿਗੁਰੂ",
  "target": "unicode"
}
Value Description
:text Text string passed by user for conversion
:target? OPTIONAL
lipi - Converts given unicode string to gurlipi text
unicode - Converts given lipi string to unicode (DEFAULT: unicode)

Add tests

Add tests that hit the API with queries

Incomplete Sri Guru Granth Sahib Ji (1430)

Dear Sir/Madam,
We all know that there are 1430 ang in shri guru granth sahib ji.
But when i use your api, i cant find and 1430.
Moreover the 1429 ang is incomplete.

Please check and revert.
Regards,
Sukhpreet Singh

Improve response structure to reduce response size

In general, you can pull WriterID, RaagID, ShabadID, PageNo, SourceID out of gurbani.shabad to gurbani.

{
  "gurbani": [
    {
      "shabad": {
        "WriterID": "1",
        "RaagID": "1",
        "ID": "1",
        "English": "One Universal Creator God. The Name Is Truth. Creative Being Personified. No Fear. No Hatred. Image Of The Undying, Beyond Birth, Self-Existent. By Guru's Grace ~",
        "Gurmukhi": "<> siq nwmu krqw purKu inrBau inrvYru Akwl mUriq AjUnI sYBM gurpRswid ]",
        "Punjabi": "Akwl purK ie`k hY, ijs dw nwm 'hoNd vwlw' hY jo isRStI dw rcnhwr hY, jo sB ivc ivAwpk hY, BY qoN rihq hY, vYr-rihq hY, ijs dw srUp kwl qoN pry hY, (Bwv, ijs dw srIr nws-rihq hY), jo jUnW ivc nhIN AwauNdw, ijs dw pRkwS Awpxy Awp qoN hoieAw hY Aqy  jo siqgurU dI ikrpw nwl imldw hY[",
        "Spanish": "Un sólo Creador Universal, Verdad es Su Nombre. Creativa Su Personalidad. Sin Miedo, sin Venganza. Inmortal, Sin Principio, Sin Fin, Auto Existente. Por la Gracia del Verdadero Guru.",
        "ShabadID": "1",
        "PageNo": "1",
        "LineNo": "1",
        "SourceID": "G",
        "FirstLetterStr": ",060,115,110,107,112,110,110,065,109,065,115,103,093,",
        "MainLetters": " sq nm krq prK nrBa nrvr Akl mrq Ajn sB gr psd ",
        "Bisram": "",
        "FirstLetterEng": "",
        "Transliteration": "ik oankaar sath naam karathaa purakh nirabho niravair akaal moorath ajoonee saibhan gurprasaadh |",
        "RaagGurmukhi": "jpu",
        "RaagEnglish": "Jap",
        "StartID": "1",
        "EndID": "",
        "RaagWithPage": "Jap (1-8)",
        "WriterEnglish": "Guru Nanak Dev Ji",
        "WriterGurmukhi": "gurU nwnk dyv jI",
        "GurmukhiUni": "ੴ ਸਤਿ ਨਾਮੁ ਕਰਤਾ ਪੁਰਖੁ ਨਿਰਭੳੁ ਨਿਰਵੈਰੁ ਅਕਾਲ ਮੂਰਤਿ ਅਜੂਨੀ ਸੈਭੰ ਗੁਰਪ੍ਰਸਾਦਿ ॥",
        "PunjabiUni": "ਅਕਾਲ ਪੁਰਖ ੲਿੱਕ ਹੈ, ਜਿਸ ਦਾ ਨਾਮ 'ਹੋਂਂਦ ਵਾਲਾ' ਹੈ ਜੋ ਸ੍ਰਿਸ਼ਟੀ ਦਾ ਰਚਨਹਾਰ ਹੈ, ਜੋ ਸਭ ਵਿਚ ਵਿਅਾਪਕ ਹੈ, ਭੈ ਤੋਂਂ ਰਹਿਤ ਹੈ, ਵੈਰ-ਰਹਿਤ ਹੈ, ਜਿਸ ਦਾ ਸਰੂਪ ਕਾਲ ਤੋਂਂ ਪਰੇ ਹੈ, (ਭਾਵ, ਜਿਸ ਦਾ ਸਰੀਰ ਨਾਸ-ਰਹਿਤ ਹੈ), ਜੋ ਜੂਨਾਂ ਵਿਚ ਨਹੀਂਂ ਅਾੳੁਂਂਦਾ, ਜਿਸ ਦਾ ਪ੍ਰਕਾਸ਼ ਅਾਪਣੇ ਅਾਪ ਤੋਂਂ ਹੋੲਿਅਾ ਹੈ ਅਤੇ  ਜੋ ਸਤਿਗੁਰੂ ਦੀ ਕਿਰਪਾ ਨਾਲ ਮਿਲਦਾ ਹੈ।",
        "WriterUni": "ਗੁਰੂ ਨਾਨਕ ਦੇਵ ਜੀ",
        "RaagUni": "ਜਪੁ"
      }
    },
    ...
  ]
}
{
  "PageNo": "1",
  "ShabadID": "1",
  "SourceID": "G",
  "RaagGurmukhi": "jpu",
  "RaagEnglish": "Jap",
  "RaagWithPage": "Jap (1-8)",
  "WriterEnglish": "Guru Nanak Dev Ji",
  "WriterGurmukhi": "gurU nwnk dyv jI",
  "WriterUni": "ਗੁਰੂ ਨਾਨਕ ਦੇਵ ਜੀ",
  "RaagUni": "ਜਪੁ",
  "WriterID": "1",
  "RaagID": "1",
  "gurbani": [
    {
      "shabad": {
        "ID": "1",
        "English": "One Universal Creator God. The Name Is Truth. Creative Being Personified. No Fear. No Hatred. Image Of The Undying, Beyond Birth, Self-Existent. By Guru's Grace ~",
        "Gurmukhi": "<> siq nwmu krqw purKu inrBau inrvYru Akwl mUriq AjUnI sYBM gurpRswid ]",
        "Punjabi": "Akwl purK ie`k hY, ijs dw nwm 'hoNd vwlw' hY jo isRStI dw rcnhwr hY, jo sB ivc ivAwpk hY, BY qoN rihq hY, vYr-rihq hY, ijs dw srUp kwl qoN pry hY, (Bwv, ijs dw srIr nws-rihq hY), jo jUnW ivc nhIN AwauNdw, ijs dw pRkwS Awpxy Awp qoN hoieAw hY Aqy  jo siqgurU dI ikrpw nwl imldw hY[",
        "Spanish": "Un sólo Creador Universal, Verdad es Su Nombre. Creativa Su Personalidad. Sin Miedo, sin Venganza. Inmortal, Sin Principio, Sin Fin, Auto Existente. Por la Gracia del Verdadero Guru.",
        "LineNo": "1",
        "FirstLetterStr": ",060,115,110,107,112,110,110,065,109,065,115,103,093,",
        "MainLetters": " sq nm krq prK nrBa nrvr Akl mrq Ajn sB gr psd ",
        "Bisram": "",
        "FirstLetterEng": "",
        "Transliteration": "ik oankaar sath naam karathaa purakh nirabho niravair akaal moorath ajoonee saibhan gurprasaadh |",
        "StartID": "1",
        "EndID": "",
        "GurmukhiUni": "ੴ ਸਤਿ ਨਾਮੁ ਕਰਤਾ ਪੁਰਖੁ ਨਿਰਭੳੁ ਨਿਰਵੈਰੁ ਅਕਾਲ ਮੂਰਤਿ ਅਜੂਨੀ ਸੈਭੰ ਗੁਰਪ੍ਰਸਾਦਿ ॥",
        "PunjabiUni": "ਅਕਾਲ ਪੁਰਖ ੲਿੱਕ ਹੈ, ਜਿਸ ਦਾ ਨਾਮ 'ਹੋਂਂਦ ਵਾਲਾ' ਹੈ ਜੋ ਸ੍ਰਿਸ਼ਟੀ ਦਾ ਰਚਨਹਾਰ ਹੈ, ਜੋ ਸਭ ਵਿਚ ਵਿਅਾਪਕ ਹੈ, ਭੈ ਤੋਂਂ ਰਹਿਤ ਹੈ, ਵੈਰ-ਰਹਿਤ ਹੈ, ਜਿਸ ਦਾ ਸਰੂਪ ਕਾਲ ਤੋਂਂ ਪਰੇ ਹੈ, (ਭਾਵ, ਜਿਸ ਦਾ ਸਰੀਰ ਨਾਸ-ਰਹਿਤ ਹੈ), ਜੋ ਜੂਨਾਂ ਵਿਚ ਨਹੀਂਂ ਅਾੳੁਂਂਦਾ, ਜਿਸ ਦਾ ਪ੍ਰਕਾਸ਼ ਅਾਪਣੇ ਅਾਪ ਤੋਂਂ ਹੋੲਿਅਾ ਹੈ ਅਤੇ  ਜੋ ਸਤਿਗੁਰੂ ਦੀ ਕਿਰਪਾ ਨਾਲ ਮਿਲਦਾ ਹੈ।",
      }
    },
    ...
  ]
}

Hukamnama not updating

It is currently 11:12 pm EST on July 20th. Today's (2017-07-21 IST) hukamnama endpoint docs indicates the hukamnama updates at 9 pm EST. I don't see it being updated. Today's hukamnama has already been updated on sgpc.net (and sikhnet): ਤੁਮ ਦਾਤੇ ਠਾਕੁਰ ਪ੍ਰਤਿਪਾਲਕ ਨਾਇਕ ਖਸਮ ਹਮਾਰੇ ॥

Here's the current output from https://api.gurbaninow.com/v2/hukamnama/today

{
	"date": {
		"gregorian": {
			"month": "December",
			"date": 31,
			"year": 1969,
			"day": "Wednesday"
		},
		"nanakshahi": {
			"english": {
				"month": "Poh",
				"date": 18,
				"year": 501,
				"day": "Budhvaar"
			},
			"punjabi": {
				"month": "ਪੋਹ",
				"date": "੧੮",
				"year": "੫੦੧",
				"day": "ਬੁੱਧਵਾਰ"
			}
		}
	},
	"hukamnamainfo": null,
	"hukamnama": [],
	"license": "CC-BY-NC-ND-4.0"
}

Database Design

Is it possible to have a copy of the database published? or a repo of the structure?

WriterID is 0 for first line in mode 2 (Shabad Search)

https://gurbaninow.com/api/?mode=2&shabadNo=123&format=json gives WriterID=0 for the first line.

"WriterID": "0", "English": "Siree Raag, Fourth Mehla:"

This should not be the case, I think you will have to update the DB for this.

Jap Pauri 28

Jap Pauri 28 on Ang 6-7 Not ordered correctly
JapPauri28-29

Database Work

https://github.com/ShabadOS/database

Main

  • Import SGGS DB
  • Import Sri Dasam Granth
  • Import Bhai Gurdas Ji
  • Import Bhai Nand Lal Ji
  • Import Sarabloh Granth Baani
  • Corrections to SGGS DB
  • Corrections to Sri Dasam Granth DB
  • Corrections Bhai Gurdas Ji DB
  • Corrections to Bhai Nand Lal Ji DB
  • Corrections to Sarabloh Granth Baani

Vishrams

  • Import Vishrams (SGGS Ji)
  • Corrections to Vishrams (SGGS Ji)
  • Import Vishrams (Sri Dasam Granth)
  • Corrections to Vishrams (Sri Dasam Granth)
  • Import Vishrams (Bhai Gurdaas Ji)
  • Import Vishraams (Bhai Nand Lal)

Indexes

  • Import Sundar Gutka Index (#27)
  • Import Writer Index
  • Import Secton Index
  • Import SubSection Index
  • Add SubSection ID's to Panktee's
  • Import Amrit Keertan Index
  • Link Shabads with Amrit Keertan Index

Translations

  • Import Sant Singh Khalsa English Translation
  • Import Prof. Sahib Singh Teeka with Arths and Notes
  • Import Fareedkot Teeka
  • Import Bhai Manmohan Singh's Punjabi and English Translations
  • Import Spanish Translations
  • [ ] Import Giani Harbans Singh Teeka

Others

  • Get Unicode Conversion Scripts Working
  • Get Hindi Transliteration Scripts Working
  • Get English Transliteration Scripts Working
  • Import GurmatBibek Ucharan PDF's

Feature Request - Sangrand & Gurpurab's Hukumnama

Hi, is it possible to include this request in a future version of API?

To request Hukumnama but instead of daily one, of Sangrad Day; as it gets issued from Harmandir Sahib Ji.

Points to consider:

  1. How to ask? Each Sangrand is 1st of desi month; total 12 months in desi Calender (List from Wikipedia). if required for Vaisakh (1st Month), aqpi endpoint can be /sangrand/1 or sangrand/01 & so on.
  2. SikhNet, the existing provider of daily Hukamnama to GurbaniNow API does not provide sangrand's one (Does it?). But it is available at Sikhnet's source http://sgpc.net/sangrand-mukhwak/, pdf format only.

Inconsistent Data Type for startang and endang

I'm trying to pull results/search by ANG.
While doing to "G"(Guru Granth Saheb), under 'RAAG' type, it gives

"raag": {
"id": 1,
"akhar": "jpu",
"unicode": "ਜਪੁ",
"english": "Jap",
"startang": 1,
"endang": 8,
"raagwithpage": "Jap (1-8)"
},

while during "D" (Dasam Granth), it gives

"raag": {
"id": 48,
"akhar": "jwpu",
"unicode": "ਜਾਪੁ",
"english": "Jaap",
"startang": "",
"endang": "",
"raagwithpage": ""
},

key "startang" and "endang" have both string and int types. I was facing issue while pulling data by serilaization as it works with non-dynamic types and wanted to see if there's any possible fix for it.
Thanks

Add pagination support for search route

Sites like STTM would need to skip and limit results for pagination.

Only skip variable needs to be added

search/:query?skip=skip&results=results

Variable Use
results Set count of results (DEFAULT 20, MAX 100)
In case skip is set, this will return results from the skip to skip+results results.
skip Skip records (DEFAULT 0)
If you want 20 to 30 results, set skip=20 and results=10

SQL based DBs have LIMIT 20, 10 or LIMIT 20 OFFSET 10 sort of syntax to do the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.