-
Notifications
You must be signed in to change notification settings - Fork 45
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
random hadith endpoint #9
Comments
Walaikum salam, you need to implement the logic in python first you need to generate a random number and then to get data from url, refer this example |
Ah ok, Jzk Khair. Does this API include Bukhari, Muslim, Sunan books etc? Or is it just riyadusalihin like sunnah.com? |
Yes it includes those books. Here are the list of available books : |
Great news... can I just ask one more thing, this endpoint you just gave which book will it yield the hadith from? And is there any range of numbers from whioch we should generate the number# Appreciate the help, May Allah SWT bless you as well. |
For range, refer For sahih muslim english edition, use this: For abu dawud english edition, Refer https://cdn.jsdelivr.net/gh/fawazahmed0/hadith-api@1/editions.json for all editions available |
Jzk, using the stackovflow link you gave me and the endpoint, It gives me
HTTP Forbidden error.
Also, using that endpoint link on a browser gives 'Package size exceeded
configured limit', is that normal?
Sorry for all the questions ... :)
Regards
Amen
…On Sat, Aug 27, 2022 at 1:34 PM Fawaz Ahmed ***@***.***> wrote:
For range, refer last_hadithnumber at this link:
***@***.***/info.json
For sahih muslim english edition, use this:
***@***.***/editions/eng-muslim/{randomnumber}.json
sahih muslim arabic edition
***@***.***/editions/ara-muslim/{randomnumber}.json
For abu dawud english edition,
***@***.***/editions/eng-abudawud/{randomnumber}.json
Refer ***@***.***/editions.json
for all editions available
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQIKRW5U74AB22CSDW4ON6LV3IDMLANCNFSM57XFIKGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
The information contained in this website is for general information
purposes only. The information is provided by [business name] and while we
endeavour to keep the information up to date and correct, we make no
representations or warranties of any kind, express or implied, about the
completeness, accuracy, reliability, suitability or availability with
respect to the website or the information, products, services, or related
graphics contained on the website for any purpose. Any reliance you place
on such information is therefore strictly at your own risk.
In no event will we be liable for any loss or damage including without
limitation, indirect or consequential loss or damage, or any loss or damage
whatsoever arising from loss of data or profits arising out of, or in
connection with, the use of this website.
Through this website you are able to link to other websites which are not
under the control of [business name]. We have no control over the nature,
content and availability of those sites. The inclusion of any links does
not necessarily imply a recommendation or endorse the views expressed
within them.
Every effort is made to keep the website up and running smoothly. However,
[business name] takes no responsibility for, and will not be liable for,
the website being temporarily unavailable due to technical issues beyond
our control.
|
can you give me the link which is showing error? |
Sure
The following link produces a forbidden error:
'
***@***.***/editions/eng-muslim/{randomnumber}.json
'
The following link makes a 'Package size exceeded configured limit' error
when I enter it into the browser:
***@***.***/editions/eng-muslim/%7B23%7D.json
Hope this helps
Regards
Muhammad Amen
…On Sat, Aug 27, 2022 at 7:53 PM Fawaz Ahmed ***@***.***> wrote:
can you give me the link which is showing error?
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQIKRW4Z2YIF6PZCHIAETW3V3JP2NANCNFSM57XFIKGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
The information contained in this website is for general information
purposes only. The information is provided by [business name] and while we
endeavour to keep the information up to date and correct, we make no
representations or warranties of any kind, express or implied, about the
completeness, accuracy, reliability, suitability or availability with
respect to the website or the information, products, services, or related
graphics contained on the website for any purpose. Any reliance you place
on such information is therefore strictly at your own risk.
In no event will we be liable for any loss or damage including without
limitation, indirect or consequential loss or damage, or any loss or damage
whatsoever arising from loss of data or profits arising out of, or in
connection with, the use of this website.
Through this website you are able to link to other websites which are not
under the control of [business name]. We have no control over the nature,
content and availability of those sites. The inclusion of any links does
not necessarily imply a recommendation or endorse the views expressed
within them.
Every effort is made to keep the website up and running smoothly. However,
[business name] takes no responsibility for, and will not be liable for,
the website being temporarily unavailable due to technical issues beyond
our control.
|
You have to replace the {randomnumber} with the random number generated in python. I assume you are new to development, it's better if you take some python's beginners course, that should definitely help you in developing your application |
Ah OK, thanks
Not new to Python I am Microsoft Certified Developer in Python, just
haven't used APIs in my use case 😅
Thanks
Amen
…On Sun, 28 Aug 2022, 07:06 Fawaz Ahmed, ***@***.***> wrote:
You have to replace the {randomnumber} with the random number generated in
python.
For example this link:
***@***.***/editions/eng-muslim/{randomnumber}.json
may become
***@***.***/editions/eng-muslim/77.json
I assume you are new to development, it's better if you take some python's
beginners course.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQIKRW6UIHWNVXY24RCR36DV3L6U5ANCNFSM57XFIKGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
oh ok! May Allah bless you for making hadith app 🙂 |
Ameen, Jzk Khair
It's a twitter bot to post hadiths, if you have twitter do follow
@SunnatRasul
Have a nice day. 👍
…On Sun, 28 Aug 2022, 13:09 Fawaz Ahmed, ***@***.***> wrote:
oh ok! May Allah bless you for making hadith app 🙂
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQIKRW43JCLFC6FI6EGZHU3V3NJHPANCNFSM57XFIKGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Salaam, is there any way we can get a random hadith using this API and Python? Any code sample?
The text was updated successfully, but these errors were encountered: