Comments (5)
For March 11 2023 The "play" link Fajr time is displayed as 5:13 am which matches expectation
https://aladhan.com/play/Corvallis/OR,%20USA
However, I am invoking the timingsByCity with the following code:
let URL = `https://api.aladhan.com/v1/timingsByCity?country=${Country}®ion=${Region}&city=${City}&method=${Method}&adjustment=${HijriCorrection}` this.Load(URL)
actual request...
and I get the following JSON with Fajr time as 5:00 am
what parameter(s) am I missing to match the timings displayed in the play link? Also, I don't see a parameter regarding whether to use the system time or cloud time? if that matters? Thank you.
You need to use the correct method - ISNA - to get the same result.
from api.aladhan.com.
I am posting method=2 in my example above
https://api.aladhan.com/v1/timingsByCity?country=US®ion=Oregon&city=Corvallis&method=2&adjustment=1
The returned JSON also says ISNA ?
from api.aladhan.com.
Where did you get the region query parameter from? The API only supports state, not region.
from api.aladhan.com.
Back in issue #52 I had asked whether "region" was an accepted parameters. I must have gotten side-tracked with your fix to a different issue and never double checked the returned timings where correct.
Because I started using a geolocation service returning "region" I must have "believed" is was accepted by this API.
TODO: Perhaps your API can return an error about illegal parameters in the future.
The following is now returning the expected times
https://api.aladhan.com/v1/timingsByCity/11-03-2023?country=US&state=Oregon&city=Corvallis&method=2&adjustment=1
Thank you for the catch, much appreciated.
Jazaakum Allahu Khayran! and Ramadhan Mubaarak and Kareem !!!
from api.aladhan.com.
Back in issue #52 I had asked whether "region" was an accepted parameters. I must have gotten side-tracked with your fix to a different issue and never double checked the returned timings where correct. Because I started using a geolocation service returning "region" I must have "believed" is was accepted by this API. TODO: Perhaps your API can return an error about illegal parameters in the future. The following is now returning the expected times https://api.aladhan.com/v1/timingsByCity/11-03-2023?country=US&state=Oregon&city=Corvallis&method=2&adjustment=1
Thank you for the catch, much appreciated. Jazaakum Allahu Khayran! and Ramadhan Mubaarak and Kareem !!!
Illegal query parameters are simply ignored - throwing errors for those is bordering an extreme in my humble opinion. Sometimes client side JavaScript calls append a timestamp or random query parameter to bypass caching, and that would result in failing calls.
It's a public API, so flexibility is always important. But reading the documentation is always the simplest way to get it right.
By the way, you can also just simply use the timingsByAddress endpoint, and just pass one string in the address query parameter.
JazakAllah for the Ramadan wishes! May yours be full of blessings too!
from api.aladhan.com.
Related Issues (20)
- Add Moonsighting Prayer Times Method HOT 5
- Automatically select calculation method based on the location to the closest authority HOT 3
- limited API HOT 3
- Add Cache Control Header to Response
- No such file or directory in /var/www/config/init.php HOT 1
- Service is unstable HOT 11
- Not working for about 3 days now HOT 4
- Prayer times as date objects HOT 6
- nextPrayerByAddress throws DateTime Error
- Return country & city information in addition to coordinates HOT 5
- A server response — we could make smaller JSON HOT 1
- Inconsistent Hijri day between calendar and v1 timingsByCity HOT 1
- state or region parameter to timingsByCity is not recognized or validated correctly HOT 5
- Missing Ramadan days with adjustment HOT 1
- Is the api down HOT 7
- ISO 8061 format is wrong? HOT 6
- api down HOT 4
- Tune setting not working when using a custom method HOT 2
- Prayer times differ between timingsByCity and calendarByCity HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.aladhan.com.