Hello there,
I have been working on my MagicMirror setup for a few weeks now and I have been thoroughly enjoying it. I have already installed a few modules and customized the interface; but now I am trying to create my own custom module that integrates data from a weather API.
While I have managed to get basic API calls working using JavaScript; I am struggling to understand how to properly fetch the data and display it within the MagicMirror framework.
I can retrieve the JSON data from the API; but I am unsure of the best way to periodically update the display with new data. Should I handle this within getDom or is there a better place to manage the periodic updates?
I have followed the basic template for a MagicMirror module; but I am unclear about best practices for splitting the API call logic and the display logic. Is it better to keep the API logic in the node_helper.js file; or can I handle everything in the main module file?
Also, I have gone through this post; https://forum.magicmirror.builders/topic/17644/a-workday-weather-module which definitely helped me out a lot.
Once the weather data is retrieved, what is the recommended method for applying custom CSS? Should I create a dedicated CSS file for my module, or are there predefined styles I should leverage to maintain consistency with the rest of the MagicMirror interface?
Thanks in advance for your help and assistance.