Include fallback mechanism in your code to avoid issues
fawazahmed0 opened this issue · 3 comments
fawazahmed0 commented
This API have multiple fallback urls:
Fallback URL:
https://raw.githubusercontent.com/fawazahmed0/quran-api/{apiVersion}/{endpoint}
Pseudo code:
For example, if you want to fetch ben-muhiuddinkhan
edition
Fetch https://cdn.jsdelivr.net/gh/fawazahmed0/quran-api@1/editions/ben-muhiuddinkhan.min.json
If above url fails, then try fetching https://cdn.jsdelivr.net/gh/fawazahmed0/quran-api@1/editions/ben-muhiuddinkhan.json
If above url fails, then try fetching https://raw.githubusercontent.com/fawazahmed0/quran-api/1/editions/ben-muhiuddinkhan.min.json
If above url fails, then try fetching https://raw.githubusercontent.com/fawazahmed0/quran-api/1/editions/ben-muhiuddinkhan.json
Abbosjonhacker commented
hi, I cannot this api for my telegram bot, I have 403 error, is there any configuration for preventing telegram bot messages
fawazahmed0 commented
Please could you share the code
Abbosjonhacker commented
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Thanks, man, I corrected itI am a new in python, I was cpp coder, and now I am learning python,so I have a typically mistakes, thanks again Sent from Mail for Windows From: Fawaz AhmedSent: Friday, May 12, 2023 9:36 PMTo: fawazahmed0/quran-apiCc: jamsCore; CommentSubject: Re: [fawazahmed0/quran-api] Include fallback mechanism in your code to avoid issues (Issue #27) Please could you share the code—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>