{"id":1129,"date":"2023-10-23T13:38:00","date_gmt":"2023-10-23T05:38:00","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=1129"},"modified":"2023-10-23T13:38:01","modified_gmt":"2023-10-23T05:38:01","slug":"additional-api-queries-for-clean-ups-initiative","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/","title":{"rendered":"Additional API Queries for Clean Up&#8217;s Initiative"},"content":{"rendered":"\n<p>In this week&#8217;s blog post, I continued the progress from last week&#8217;s clean-up initiative. My focus was on refining the logic used to manage data. The latest logic I developed was crucial for handling different data. It involved creating one and two API queries respectively, designed outside the context but essential for its functionality. These developments were not only pertinent for the present but also aimed at easing future processes.<\/p>\n\n\n\n<p>Achieving the accurate data of certain context posed a challenge as it required data beyond the one database. Fortunately, Mr. Peter patiently guided me on the approach to obtain this information.<\/p>\n\n\n\n<p>Diving into the code, I initially drafted the solution and managed to complete it within a day. However, during code cleanup, I realized I had mixed up service and calling entities in a repository, a mistake that highlighted the importance of writing clean and efficient code. Learning from this, I refactored the entire codebase, ensuring that the code was organized properly, with context and inventory used only in their intended places.<\/p>\n\n\n\n<p>Moving forward, I tackled the next API query with meticulous care, being mindful of my code structure. Towards the end of the week, I presented my progress, Mr. Peter then provided valuable insights, and demonstrated the need for specific validators in the API queries. His guidance ensured that I wrote the validators correctly, enabling efficient utilization without the need for additional checks or data validation in subsequent parts of the code.<\/p>\n\n\n\n<p>While I made significant strides, there was still a need for a minor refactor in the clean-up service before I could proceed to work on the clean-up view page, a task that will be continued in the upcoming week.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this week&#8217;s blog post, I continued the progress from last week&#8217;s clean-up initiative. My focus was on refining the logic used to manage data. The latest logic I developed was crucial for handling different data. It involved creating one and two API queries respectively, designed outside the context but essential for its functionality. These &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Additional API Queries for Clean Up&#8217;s Initiative&#8221;<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Additional API Queries for Clean Up&#039;s Initiative | Tong Hin&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Additional API Queries for Clean Up&#039;s Initiative | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"In this week&#8217;s blog post, I continued the progress from last week&#8217;s clean-up initiative. My focus was on refining the logic used to manage data. The latest logic I developed was crucial for handling different data. It involved creating one and two API queries respectively, designed outside the context but essential for its functionality. These &hellip; Continue reading &quot;Additional API Queries for Clean Up&#8217;s Initiative&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-23T05:38:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-23T05:38:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\",\"name\":\"Additional API Queries for Clean Up's Initiative | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2023-10-23T05:38:00+00:00\",\"dateModified\":\"2023-10-23T05:38:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/\",\"name\":\"Additional API Queries for Clean Up&#8217;s Initiative\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/81e2366362d8d14b15519395755cee6f\"},\"headline\":\"Additional API Queries for Clean Up&#8217;s Initiative\",\"datePublished\":\"2023-10-23T05:38:00+00:00\",\"dateModified\":\"2023-10-23T05:38:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/23\/additional-api-queries-for-clean-ups-initiative\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/81e2366362d8d14b15519395755cee6f\",\"name\":\"nurlailiyuzi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c0d4cc6f7fc881bd56d95bdbb0c4c14?s=96&d=mm&r=g\",\"caption\":\"nurlailiyuzi\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1129"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=1129"}],"version-history":[{"count":2,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1129\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1129\/revisions\/1134"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=1129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=1129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=1129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}