islamic-network / api.aladhan.com

The AlAdhan API
GNU General Public License v3.0
118 stars 30 forks source link

A server response — we could make smaller JSON #48

Closed ibragimof closed 2 years ago

ibragimof commented 2 years ago

Each request generates calculations for a given month. By this case if we have sent request in 29th of October, it responses with JSON, where a praying times starts with a month ago useless date. By this way we have got ≈50Kb unnecessary lines of JSON instead 2-3Kb actual data. We need a method, where sender can set number of days, in which he needs to get prayer dates. For example it can be &data=%number of the days% for getting JSON table, where calculation starts from today and ends after given numbers day. I also suggest that if user send query without &data='...' parameter, by default server returns info for today calculations only.

meezaan commented 2 years ago

@ibragimof you can already get the data for a single day, any day, you don't need to request data for a whole month.

If you want a date range, it can be done, it will be treated as an enhancement on the backlog of work, unless you would like to contribute?