fawazahmed0/quran-api

Include fallback mechanism in your code to avoid issues

fawazahmed0 opened this issue · 3 comments

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

hi, I cannot this api for my telegram bot, I have 403 error, is there any configuration for preventing telegram bot messages

Please could you share the code