Read the statement by Michael Teeuw here.
Develop module with API
-
@Sean @sdetweil I finaly figured it out! Thanx for the support and pointing me in the correct direction. See the result:
var MPT = this.MPT; // creating the tablerows // Fajr var FajrRow = document.createElement("tr") FajrRow.className = "small fajr-row"; var FajrTextCell = document.createElement("td"); FajrTextCell.innerHTML = "Fajr"; FajrRow.appendChild(FajrTextCell); table.appendChild(FajrRow); var FajrTimeCell = document.createElement("td"); FajrTimeCell.className = "bright"; FajrTimeCell.innerHTML = MPT.Fajr; FajrRow.appendChild(FajrTimeCell); table.appendChild(FajrRow); var FajrArabCell = document.createElement("td"); FajrArabCell.innerHTML = "الفجر"; FajrRow.appendChild(FajrArabCell); table.appendChild(FajrRow); ...... } return table;
-
Fabulous! Nice work!
-
@Mykle1 Thanks for the MMM-UFO “templates”. This really helped me to get started.
First one down, several to go…:winking_face: -
You’re welcome, mate. And with @sdetweil and @Sean you found the best help possible. :thumbsup:
-
Thanks tipobet
-
Hi @Mykle1 , i am impressed with your MMM-UFO template.
Unfortunately the link -->https://ufo-api.herokuapp.com/api/sightings/search?city=new york&state=ny&limit=50&skip=0 seem like down.Could you please have a look at it? so that I could refer to.
Thanks!!
-
@rick93 said in Develop module with API:
Could you please have a look at it?
Well, I just took a look at the api and it is down, as you already discovered. There is nothing I can do about that. However, I will take a look around and see if I can find another. Unknown if I will be able to find one but give me some time. No promises. I will do my best.
-
@Mykle1 thanks for your prompt reply and support. I am looking at your API information to compare with your tutorial in the module so that I know what parameter to change. It’s fine if you can share the API’s data/code, doesn’t really need to repair the link or find another. let me know if you can recall back from any previous code in storage. Appreciate!
-
@rick93 said in Develop module with API:
It’s fine if you can share the API’s data/code, doesn’t really need to repair the link or find another.
I’m not really sure what you are asking me for. The API is dead so there is nothing that I can give you. The link is good but the API is dead so there is no repairing it. :-/
-
@Mykle1 said in Develop module with API:
@rick93 said in Develop module with API:
It’s fine if you can share the API’s data/code, doesn’t really need to repair the link or find another.
I’m not really sure what you are asking me for. The API is dead so there is nothing that I can give you. The link is good but the API is dead so there is no repairing it. :-/
@Mykle1 Understood. I am actually trying to create my module for the Singapore weather forecast via API --“https://api.data.gov.sg/v1/environment/4-day-weather-forecast”.
I am new to MM as well as JS, so I do like to learn the way you code for the API, so I can get the idea to code my own.
Anyway, I will find another example to continue my coding.
Thanks.