-
Notifications
You must be signed in to change notification settings - Fork 76
support multi URN lookup for hadith #2512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
support querying multiple hadiths at once.
support multiple hadith ids passed to the api
|
See inline |
| abort(400, f"Too many URNs (max {MAX_URNS}).") | ||
|
|
||
| results = ( | ||
| Hadith.query.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
@Suhaibinator this should be equivalent to:
SELECT *
FROM hadith
WHERE english_urn IN (:u1, :u2, ...)
OR arabic_urn IN (:u1, :u2, ...);
|
@isadreddin we support multiple languages however. Shouldn't such an API query all languages, not just English and Arabic? |
|
I was not aware of any other urns besides Arabic and English. Seems the existing api end point for retrieving a single Hadith behaves the same. Let me know. |
|
Every hadith/translation will have a URN. For now let's conform with the single hadith endpoint parameters; if it only supports Arabic and English let's move forward with this, if it supports others then let's have this support others as well. But let's move to have both support all languages if the former is the case. |
|
singe hadith logic is as follows: can we merge the change? |
No description provided.