Testing the API
هذا الالتزام موجود في:
9
app.js
9
app.js
@@ -1,3 +1,8 @@
|
||||
function getTimes(city, countryCode){
|
||||
|
||||
async function getTimes(city, countryCode){
|
||||
console.log("Starting . . .")
|
||||
const response = await fetch(`http://api.aladhan.com/v1/timingsByCity?city=${city}&country=${countryCode}`)
|
||||
const parsedResponse = await response.json();
|
||||
console.log(parsedResponse.data.timings)
|
||||
}
|
||||
|
||||
document.getElementById("getTimes").onclick = ()=> getTimes(city.value, code.value)
|
||||
|
المرجع في مشكلة جديدة
حظر مستخدم