GET times/this_week
Returns this week's prayer times based on given zone.
Resource URL
http://api.azanpro.com/times/this_week.json
Parameters
Parameter | Remark | Description | ||||||
---|---|---|---|---|---|---|---|---|
zone | Required | The location code based on prayer time zones provided by Jakim. Input: Refer to zone codes here. |
||||||
format | Optional |
Options for time formatting
|
||||||
pre | Optional |
Show result in preformatted text enclosed with <pre> tags. Input: true / false Default: false |
||||||
dow | Optional |
Define the preferred first day of week. Input: sunday / monday Default: monday |
Response Fields
Parameter | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zone | The location code based on prayer time zones provided by Jakim. Refer to zone codes here. | ||||||||||||||||||
start | Start date in format `dd-mm-yyyy`. | ||||||||||||||||||
end | End date in format `dd-mm-yyyy`. | ||||||||||||||||||
locations | List of locations identified by Jakim for which having similar prayer timezone. | ||||||||||||||||||
prayer_times |
prayer times information based on the selected zone.
|
Exception Fields
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
error_code | Return error code `400` for any error occured. | ||||||||
error_type | Error types either REQUIRED_FIELD, INVALID_ZONE, LIMIT_EXCEEDED or COMPLEX_ERROR | ||||||||
error_desc |
Show error description based on table below
|
Example Request
http://api.azanpro.com/times/this_week.json?zone=sgr01&format=12-hour
Example Result
{ "zone": "SGR01", "start": "19-04-2021", "end": "25-04-2021", "locations": [ "Gombak", "Hulu Selangor", "Rawang", "Hulu Langat", "Sepang", "Petaling", "Shah Alam" ], "prayer_times": [ { "date": "19-04-2021", "datestamp": 1618761600, "imsak": "5:48 am", "subuh": "5:58 am", "syuruk": "7:05 am", "zohor": "1:15 pm", "asar": "4:28 pm", "maghrib": "7:21 pm", "isyak": "8:31 pm" }, { "date": "20-04-2021", "datestamp": 1618848000, "imsak": "5:47 am", "subuh": "5:57 am", "syuruk": "7:05 am", "zohor": "1:15 pm", "asar": "4:28 pm", "maghrib": "7:21 pm", "isyak": "8:31 pm" }, { "date": "21-04-2021", "datestamp": 1618934400, "imsak": "5:47 am", "subuh": "5:57 am", "syuruk": "7:05 am", "zohor": "1:15 pm", "asar": "4:29 pm", "maghrib": "7:21 pm", "isyak": "8:31 pm" }, { "date": "22-04-2021", "datestamp": 1619020800, "imsak": "5:46 am", "subuh": "5:56 am", "syuruk": "7:04 am", "zohor": "1:15 pm", "asar": "4:29 pm", "maghrib": "7:20 pm", "isyak": "8:31 pm" }, { "date": "23-04-2021", "datestamp": 1619107200, "imsak": "5:46 am", "subuh": "5:56 am", "syuruk": "7:04 am", "zohor": "1:15 pm", "asar": "4:29 pm", "maghrib": "7:20 pm", "isyak": "8:31 pm" }, { "date": "24-04-2021", "datestamp": 1619193600, "imsak": "5:46 am", "subuh": "5:56 am", "syuruk": "7:04 am", "zohor": "1:14 pm", "asar": "4:29 pm", "maghrib": "7:20 pm", "isyak": "8:31 pm" }, { "date": "25-04-2021", "datestamp": 1619280000, "imsak": "5:45 am", "subuh": "5:55 am", "syuruk": "7:04 am", "zohor": "1:14 pm", "asar": "4:30 pm", "maghrib": "7:20 pm", "isyak": "8:31 pm" } ] }