Hi All,
I try to work on this API but seem not shows.
here the details.
URL :https://api.aladhan.com/v1/calendarByCity/2024/4?city=Kualalumpur&country=Malaysia&method=2
Hi All,
I try to work on this API but seem not shows.
here the details.
URL :https://api.aladhan.com/v1/calendarByCity/2024/4?city=Kualalumpur&country=Malaysia&method=2
that URL returns data ! a huge amount.
what fields do you want to extract.
the fields (and json structure) can be found here
specify the fields you want to obtain. do you want to get some fields for one day only,specificy city or all fields for all days.
please specify what you want to get.
Hi @manyone ,
Thank you for your respond.
what i want from current date today it will show prayer times such as Fajr, Sunshine and Asr and location let say Europe/London.
there are 9 timings
“Fajr”: “03:57”,
“Sunrise”: “05:46”,
“Dhuhr”: “12:59”,
“Asr”: “16:55”,
“Sunset”: “20:12”,
“Maghrib”: “20:12”,
“Isha”: “22:02”,
“Imsak”: “03:47”,
“Midnight”: “00:59”
do you want only fajr,sunshine and asr ? or all 9?
is the school (method of computation) to be supplied or use default 0=shafi
do you have a list of city country combinations or it should generate choices from the json - so user can pick? or it should pick from your current location (as detercted by your mobile)?
i want 6 of timing such as farj, sunrise, Dhuhr, Asr, Maghrib and Isha. each of them at different button or label.
method of computation should be default one.
Country Malaysia and city let user choose it such as kuala lumpur or Selangor.
right now -it’s specific for kuala lumpur, malaysia only.
the button performs the lookup. today’s date is always taken, in the current month.
here’s my output
here’s the link to the program (go to screen named PrayerTime)
https://x.thunkable.com/copy/191fcb46b99362b7978400b30f89375d
here’s the code:
Apreacited your time and effort.
I will try to simulated the block to my page. i will let you know my opinion on this.
thanks again.
Hi @manyone
I tried simulating the block again, but it did not appear to work on my end.
Maybe you can show me which part I am doing wrong.
https://x.thunkable.com/copy/daf5eb4d4a61ce7d0383163c80b20696
Your Web API url is different from @manyone’s. Not sure if that’s causing the problem but it might.
Edit: I tried your url in @manyone’s project and it still worked.
thanks to @tatiang for responding to your issue.
as he mentioned, your new url still works in my blocks, but the results are probably not what you expect.
it happens to work because the 2 api calls have the same required parameters.
http://api.aladhan.com/v1/calendarByCity/2024/3?city=...&country=…
http://api.aladhan.com/v1/hijriCalendarByCity/2024/3?city=...&country=…
in version1, the year and month are obtained from the device automatically. However in version 2, the year and month are supposed to be valid values from the hijri calendar and the webapp may have converted the numbers to a different year and month!
look at the dates displayed by calling a differen url
version 1 calendarByCity
version2 hijriCalendarByCity
i suggest you stick to version 1 only
i
change url up to this sentence right? “http://api.aladhan.com/v1/calendarByCity/” or full url?
still not work from my end.
the first slot in your join block should contain this text:
change the slot “?country” to “&country”
you also need to change the properties of your text input field by clicking on the Advance tab
and making the settings for those shown below
Thank you @manyone it worked now.
I am try to understand your block.
any chance if i want to create sunrise one text, dhuhr one text? what should i change?
Simple. Create a new routine, call it get_timing_text, copy from get_timing2 but simply return the “get property…” value of the timing. Do not use the join block.
if you want to show the timings on screen in their own box, you have to do this statement below for one label , for example sunrise. (you have to convert to block, of course)
Set label_sunrise = get_timing_text(“sunrise”)
And do that for every timing you want (you have to define all labels first and put them in the screen where you want, of course)
Then you can delete the 'for each item" block.
You can do it
Hi @manyone
I was doing something on block and somehow the Farj data not populate. i try to figure out but did not find the source. Appreciated if you can advice me how to get back the data. here the link and block.
you misspelled ‘Fajr’
my bad, thank you for your help.
i enhance a bit of your block by adding a few cities. so users able to select which cites their belong. That good enough for now. Thank again @manyone
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.