19.2.2024 – Last week flew by with the celebrations of the Chinese New Year Holiday. I am thankful for the chance to rest and enjoy the festivities. As soon as I returned from the holiday, I immediately worked on drafting an API essential for graph display based on user selections: monthly, yearly, or the last 3 months. Initially, I focused on the monthly aspect, ensuring the API could retrieve data for each of the 12 months based on the user’s chosen year. After completing the API, I conducted a simple test to confirm its functionality before integrating it into the user interface.
Subsequently, I tackled the yearly functionality. This entailed the API receiving an integer representing the selected year and the number of years the user wants to view, returning a dataset spanning the specified years. However, nearing the end of the week, I realized the approach might not be the most practical. I believe there’s a more efficient way to consolidate the monthly, yearly, and last 3 months functionalities into a single API call. I intend to brainstorm for a better solution and seek guidance from Mr. Peter for further insights.
